Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
- Module support
- DOM manipulation
- Animations
- Templating
Author: Ari Lerner.
AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:
| module Kernel | |
| def from(mod, include: []) | |
| raise TypeError, "argument must be a module" unless Module === mod | |
| # print include | |
| include.each do |name, original| | |
| define_method(name, mod.instance_method(original || name)) | |
| end | |
| end | |
| def kernal_test |
| require 'uri' | |
| require 'net/http' | |
| url = URI("http://mockbin.com/request?foo=bar&foo=baz") | |
| http = Net::HTTP.new(url.host, url.port) | |
| request = Net::HTTP::Post.new(url) | |
| request["cookie"] = 'foo=bar; bar=baz' | |
| request["accept"] = 'application/json' |
Install foreman gem to manage processes
web: rails server
Type following command
https://medium.com/@rdsubhas/ruby-in-production-lessons-learned-36d7ab726d99
Install foreman gem to manage processes
#Integration testing with live test website. Restoring the state of the database after test suite. ##Challenges
| require 'capybara' | |
| require 'capybara/angular' | |
| require 'active_record' | |
| require 'pg' | |
| class ContactServiceTesting | |
| include Capybara::DSL | |
| include Capybara::Angular::DSL |
| # GET COLUMN NAMES AND THEIR TYPE | |
| ActiveRecord::Base.connection.columns(table_name).each {|c| puts "- " + c.name + ": " + c.type.to_s + " " + c.limit.to_s} |
##Notes on Self Management
| <html> | |
| <script> | |
| </script> | |
| <body> | |
| <script> | |
| var Class = function(){ | |