rows_controller 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e1d6baf7d16e5d303e0de6d2773d38c332d10f5
4
- data.tar.gz: 82489180b3ffdf6e8e9c94012a307173b65244ea
3
+ metadata.gz: f460bf2783c8ab4cbe64c5eb9cba445a7d972dbd
4
+ data.tar.gz: 4bfef7f9bb952b3623af6a8af64f9e6ef3c838ae
5
5
  SHA512:
6
- metadata.gz: 42ca7f93249f7b006c9cc35e4b19bb12d57644882cdb490ed301388a23e01cca4d359d3b802f14f9cfb696a4837ed818405b27eb4abb6cbd59e21281f395a36c
7
- data.tar.gz: c966c57032615fa24ed7b69b36132cbb976236f9025e1232f487eccca5cc71577f5990c65a3e99ff9571e039d64d3c439b968a4c60f4f5b4cc62908d39069342
6
+ metadata.gz: 2a18a6e7281447f42d2ef4e51cfc2cb999366fa8ac6ef65f7d4539aa766c71f2a2908aad7c66e1baee729e0c341ccb62ead22eb9307fe90a81c924f5bd1a05e8
7
+ data.tar.gz: e8a45493a8eb0d713213d79bf1e1b49d3cecba930e25fe22fb53ecded93c725edf9943478bda97ad095be006ae597cf34a55e39db8a8833b26c0706fb1022d0e
data/.travis.yml CHANGED
@@ -7,8 +7,8 @@ rvm:
7
7
  - 2.1.0
8
8
 
9
9
  env:
10
- - "RAILS_VERSION=3.2.16"
11
- - "RAILS_VERSION=4.0.2"
10
+ # - "RAILS_VERSION=3.2.16"
11
+ - "RAILS_VERSION=4.1.6"
12
12
 
13
13
  notifications:
14
14
  email: false
data/Gemfile CHANGED
@@ -1,14 +1,13 @@
1
1
  source "https://rubygems.org"
2
- ##gemspec
3
2
 
4
3
  version = ENV["RAILS_VERSION"]
5
- gem 'rails', version ? "~> #{version}" : ">= 4.0.2"
4
+ gem 'rails', version ? "~> #{version}" : '>= 4.1'
6
5
 
7
6
  gem 'slim'
8
7
 
9
8
  group :test do
10
9
  gem 'capybara'
11
- gem 'rspec-rails'
10
+ gem 'rspec-rails', '>= 3.1'
12
11
  end
13
12
 
14
13
  group :development, :test do
@@ -16,5 +15,6 @@ group :development, :test do
16
15
  gem 'watchr'
17
16
  gem 'spork'
18
17
  gem 'simplecov', require: false
19
- gem 'gem-release'
20
18
  end
19
+
20
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,112 +1,119 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rows_controller (1.1.7)
5
+
1
6
  GEM
2
7
  remote: https://rubygems.org/
3
8
  specs:
4
- actionmailer (4.0.2)
5
- actionpack (= 4.0.2)
6
- mail (~> 2.5.4)
7
- actionpack (4.0.2)
8
- activesupport (= 4.0.2)
9
- builder (~> 3.1.0)
10
- erubis (~> 2.7.0)
9
+ actionmailer (4.1.6)
10
+ actionpack (= 4.1.6)
11
+ actionview (= 4.1.6)
12
+ mail (~> 2.5, >= 2.5.4)
13
+ actionpack (4.1.6)
14
+ actionview (= 4.1.6)
15
+ activesupport (= 4.1.6)
11
16
  rack (~> 1.5.2)
12
17
  rack-test (~> 0.6.2)
13
- activemodel (4.0.2)
14
- activesupport (= 4.0.2)
15
- builder (~> 3.1.0)
16
- activerecord (4.0.2)
17
- activemodel (= 4.0.2)
18
- activerecord-deprecated_finders (~> 1.0.2)
19
- activesupport (= 4.0.2)
20
- arel (~> 4.0.0)
21
- activerecord-deprecated_finders (1.0.3)
22
- activesupport (4.0.2)
23
- i18n (~> 0.6, >= 0.6.4)
24
- minitest (~> 4.2)
25
- multi_json (~> 1.3)
18
+ actionview (4.1.6)
19
+ activesupport (= 4.1.6)
20
+ builder (~> 3.1)
21
+ erubis (~> 2.7.0)
22
+ activemodel (4.1.6)
23
+ activesupport (= 4.1.6)
24
+ builder (~> 3.1)
25
+ activerecord (4.1.6)
26
+ activemodel (= 4.1.6)
27
+ activesupport (= 4.1.6)
28
+ arel (~> 5.0.0)
29
+ activesupport (4.1.6)
30
+ i18n (~> 0.6, >= 0.6.9)
31
+ json (~> 1.7, >= 1.7.7)
32
+ minitest (~> 5.1)
26
33
  thread_safe (~> 0.1)
27
- tzinfo (~> 0.3.37)
28
- arel (4.0.1)
29
- atomic (1.1.14)
30
- builder (3.1.4)
31
- capybara (2.2.1)
34
+ tzinfo (~> 1.1)
35
+ arel (5.0.1.20140414130214)
36
+ builder (3.2.2)
37
+ capybara (2.4.4)
32
38
  mime-types (>= 1.16)
33
39
  nokogiri (>= 1.3.3)
34
40
  rack (>= 1.0.0)
35
41
  rack-test (>= 0.5.4)
36
42
  xpath (~> 2.0)
37
43
  diff-lcs (1.2.5)
38
- docile (1.1.2)
44
+ docile (1.1.5)
39
45
  erubis (2.7.0)
40
- gem-release (0.7.1)
41
46
  hike (1.2.3)
42
- i18n (0.6.9)
43
- mail (2.5.4)
44
- mime-types (~> 1.16)
45
- treetop (~> 1.4.8)
46
- mime-types (1.25.1)
47
- mini_portile (0.5.2)
48
- minitest (4.7.5)
49
- multi_json (1.8.4)
50
- nokogiri (1.6.1)
51
- mini_portile (~> 0.5.0)
52
- polyglot (0.3.3)
47
+ i18n (0.6.11)
48
+ json (1.8.1)
49
+ mail (2.6.1)
50
+ mime-types (>= 1.16, < 3)
51
+ mime-types (2.4.1)
52
+ mini_portile (0.6.0)
53
+ minitest (5.4.2)
54
+ multi_json (1.10.1)
55
+ nokogiri (1.6.3.1)
56
+ mini_portile (= 0.6.0)
53
57
  rack (1.5.2)
54
58
  rack-test (0.6.2)
55
59
  rack (>= 1.0)
56
- rails (4.0.2)
57
- actionmailer (= 4.0.2)
58
- actionpack (= 4.0.2)
59
- activerecord (= 4.0.2)
60
- activesupport (= 4.0.2)
60
+ rails (4.1.6)
61
+ actionmailer (= 4.1.6)
62
+ actionpack (= 4.1.6)
63
+ actionview (= 4.1.6)
64
+ activemodel (= 4.1.6)
65
+ activerecord (= 4.1.6)
66
+ activesupport (= 4.1.6)
61
67
  bundler (>= 1.3.0, < 2.0)
62
- railties (= 4.0.2)
63
- sprockets-rails (~> 2.0.0)
64
- railties (4.0.2)
65
- actionpack (= 4.0.2)
66
- activesupport (= 4.0.2)
68
+ railties (= 4.1.6)
69
+ sprockets-rails (~> 2.0)
70
+ railties (4.1.6)
71
+ actionpack (= 4.1.6)
72
+ activesupport (= 4.1.6)
67
73
  rake (>= 0.8.7)
68
74
  thor (>= 0.18.1, < 2.0)
69
- rake (10.1.1)
70
- rspec-core (2.14.7)
71
- rspec-expectations (2.14.5)
72
- diff-lcs (>= 1.1.3, < 2.0)
73
- rspec-mocks (2.14.5)
74
- rspec-rails (2.14.1)
75
+ rake (10.3.2)
76
+ rspec-core (3.1.7)
77
+ rspec-support (~> 3.1.0)
78
+ rspec-expectations (3.1.2)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.1.0)
81
+ rspec-mocks (3.1.3)
82
+ rspec-support (~> 3.1.0)
83
+ rspec-rails (3.1.0)
75
84
  actionpack (>= 3.0)
76
- activemodel (>= 3.0)
77
85
  activesupport (>= 3.0)
78
86
  railties (>= 3.0)
79
- rspec-core (~> 2.14.0)
80
- rspec-expectations (~> 2.14.0)
81
- rspec-mocks (~> 2.14.0)
82
- simplecov (0.8.2)
87
+ rspec-core (~> 3.1.0)
88
+ rspec-expectations (~> 3.1.0)
89
+ rspec-mocks (~> 3.1.0)
90
+ rspec-support (~> 3.1.0)
91
+ rspec-support (3.1.2)
92
+ simplecov (0.9.1)
83
93
  docile (~> 1.1.0)
84
- multi_json
94
+ multi_json (~> 1.0)
85
95
  simplecov-html (~> 0.8.0)
86
96
  simplecov-html (0.8.0)
87
- slim (2.0.2)
88
- temple (~> 0.6.6)
97
+ slim (2.1.0)
98
+ temple (~> 0.6.9)
89
99
  tilt (>= 1.3.3, < 2.1)
90
100
  spork (0.9.2)
91
- sprockets (2.10.1)
101
+ sprockets (2.12.2)
92
102
  hike (~> 1.2)
93
103
  multi_json (~> 1.0)
94
104
  rack (~> 1.0)
95
105
  tilt (~> 1.1, != 1.3.0)
96
- sprockets-rails (2.0.1)
106
+ sprockets-rails (2.2.0)
97
107
  actionpack (>= 3.0)
98
108
  activesupport (>= 3.0)
99
- sprockets (~> 2.8)
100
- sqlite3 (1.3.8)
101
- temple (0.6.7)
102
- thor (0.18.1)
103
- thread_safe (0.1.3)
104
- atomic
109
+ sprockets (>= 2.8, < 4.0)
110
+ sqlite3 (1.3.9)
111
+ temple (0.6.9)
112
+ thor (0.19.1)
113
+ thread_safe (0.3.4)
105
114
  tilt (1.4.1)
106
- treetop (1.4.15)
107
- polyglot
108
- polyglot (>= 0.3.1)
109
- tzinfo (0.3.38)
115
+ tzinfo (1.2.2)
116
+ thread_safe (~> 0.1)
110
117
  watchr (0.7)
111
118
  xpath (2.0.0)
112
119
  nokogiri (~> 1.3)
@@ -116,9 +123,9 @@ PLATFORMS
116
123
 
117
124
  DEPENDENCIES
118
125
  capybara
119
- gem-release
120
- rails (>= 4.0.2)
121
- rspec-rails
126
+ rails (>= 4.1)
127
+ rows_controller!
128
+ rspec-rails (>= 3.1)
122
129
  simplecov
123
130
  slim
124
131
  spork
data/SNIPPETS CHANGED
@@ -1,5 +1,8 @@
1
1
  rails plugin new rows_controller --full
2
2
 
3
+ gem install rubocop
4
+
5
+
3
6
  Development line
4
7
  ----------------
5
8
 
@@ -1,3 +1,3 @@
1
1
  module Rows
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
@@ -5,20 +5,20 @@ require 'rows_controller/version'
5
5
 
6
6
  # Describe your gem and declare its dependencies:
7
7
  Gem::Specification.new do |s|
8
- s.name = "rows_controller"
8
+ s.name = 'rows_controller'
9
9
  s.version = Rows::VERSION
10
10
  s.licenses = ['MIT']
11
11
  s.platform = Gem::Platform::RUBY
12
- s.summary = "RowsController DRYs your controllers."
13
- s.description = "YourController < RowsController ( < ApplicationController)."
12
+ s.summary = 'RowsController DRYs your controllers.'
13
+ s.description = 'YourController < RowsController ( < ApplicationController).'
14
14
  s.authors = ['Dittmar Krall']
15
15
  s.email = ['dittmar.krall@matique.de']
16
- s.homepage = "http://matique.de"
16
+ s.homepage = 'http://matique.de'
17
17
 
18
18
  s.files = `git ls-files`.split("\n")
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
- s.require_paths = ["lib"]
21
+ s.require_paths = ['lib']
22
22
 
23
23
  s.add_development_dependency 'sqlite3', '~> 0' # for testing
24
24
  s.add_development_dependency 'rspec-rails', '~> 0'
@@ -9,9 +9,9 @@ describe OrdersController, ':' do
9
9
  describe "#{action}" do
10
10
  it "renders the '#{action}' template" do
11
11
  get action.to_sym
12
- response.code.should eq('200')
13
- response.should render_template("rows/#{action}")
14
- response.body.should == ''
12
+ expect(response.code).to eq('200')
13
+ expect(response).to render_template("rows/#{action}")
14
+ expect(response.body).to eq('')
15
15
  end
16
16
  end
17
17
  end
@@ -20,58 +20,58 @@ describe OrdersController, ':' do
20
20
  describe "#{action}" do
21
21
  it "renders the '#{action}' template" do
22
22
  get action.to_sym, :id => order.id
23
- response.code.should eq('200')
24
- response.should render_template("rows/#{action}")
25
- response.body.should == ''
23
+ expect(response.code).to eq('200')
24
+ expect(response).to render_template("rows/#{action}")
25
+ expect(response.body).to eq('')
26
26
  end
27
27
  end
28
28
  end
29
29
 
30
30
  it 'checking resource' do
31
31
  get :show, :id => order.id
32
- subject.send(:resource).should == order
33
- assigns(:order).should == order
34
- assigns(:row).should == order
32
+ expect(subject.send(:resource)).to eq(order)
33
+ expect(assigns(:order)).to eq(order)
34
+ expect(assigns(:row)).to eq(order)
35
35
  end
36
36
 
37
37
  it 'checking resources' do
38
38
  get :index
39
- subject.send(:resources).to_a.should be_a_kind_of(Array)
40
- assigns(:orders).to_a.should be_a_kind_of(Array)
41
- assigns(:orders).should == Order.all
42
- assigns(:rows).should == Order.all
39
+ expect(subject.send(:resources).to_a).to be_a_kind_of(Array)
40
+ expect(assigns(:orders).to_a).to be_a_kind_of(Array)
41
+ expect(assigns(:orders)).to eq(Order.all)
42
+ expect(assigns(:rows)).to eq(Order.all)
43
43
  end
44
44
 
45
45
  it 'checking model_class' do
46
46
  get :show, :id => order.id
47
- subject.send(:model_class).should == Order
48
- subject.send(:model_name).should == 'Order'
49
- subject.send(:model_symbol).should == 'order'
50
- subject.send(:model_symbol_plural).should == 'orders'
47
+ expect(subject.send(:model_class)).to eq(Order)
48
+ expect(subject.send(:model_name)).to eq('Order')
49
+ expect(subject.send(:model_symbol)).to eq('order')
50
+ expect(subject.send(:model_symbol_plural)).to eq('orders')
51
51
  end
52
52
 
53
53
  it 'should update' do
54
54
  put :update, { id: order.id, order: {name: 'name'} }
55
- response.should be_true
56
- response.should redirect_to(action: :edit)
55
+ expect(response).to be_truthy
56
+ expect(response).to redirect_to(action: :edit)
57
57
  end
58
58
 
59
59
  it 'should update #2' do
60
60
  put :update, { id: order.id, commit: 'OK', order: {name: 'name'} }
61
- response.should be_true
62
- response.should redirect_to(action: :index)
61
+ expect(response).to be_truthy
62
+ expect(response).to redirect_to(action: :index)
63
63
  end
64
64
 
65
65
  it 'should not update' do
66
66
  put :update, { id: order.id, order: {name: 'error'} }
67
- response.should be_success
68
- response.should render_template('rows/edit')
67
+ expect(response).to be_success
68
+ expect(response).to render_template('rows/edit')
69
69
  end
70
70
 
71
71
  it 'should not create' do
72
72
  post :create, { id: order.id, order: {name: 'error'} }
73
- response.should be_success
74
- response.should render_template('rows/new')
73
+ expect(response).to be_success
74
+ expect(response).to render_template('rows/new')
75
75
  end
76
76
 
77
77
  end
@@ -84,9 +84,9 @@ end
84
84
  describe CategoriesController do
85
85
  it 'checking model_class' do
86
86
  get :index
87
- subject.send(:model_class).should == Order
88
- subject.send(:model_name).should == 'Order'
89
- subject.send(:model_symbol).should == 'order'
90
- subject.send(:model_symbol_plural).should == 'orders'
87
+ expect(subject.send(:model_class)).to eq(Order)
88
+ expect(subject.send(:model_name)).to eq('Order')
89
+ expect(subject.send(:model_symbol)).to eq('order')
90
+ expect(subject.send(:model_symbol_plural)).to eq('orders')
91
91
  end
92
92
  end
@@ -18,7 +18,7 @@ describe RowsController do
18
18
  specify { should respond_to(:destroy) }
19
19
 
20
20
  it 'coverage resource_format' do
21
- subject.send(:resource_format, 'abc').should == 'abc'
21
+ expect(subject.send(:resource_format, 'abc')).to eq('abc')
22
22
  end
23
23
 
24
24
  end
data/spec/dummy/Rakefile CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  require File.expand_path('../config/application', __FILE__)
5
5
 
6
- Dummy::Application.load_tasks
6
+ Rails.application.load_tasks
@@ -1,3 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
- protect_from_forgery
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
3
5
  end
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -2,7 +2,7 @@ require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require 'rails/all'
4
4
 
5
- Bundler.require(*Rails.groups(:assets => %w(development test)))
5
+ Bundler.require(*Rails.groups)
6
6
  require "rows_controller"
7
7
 
8
8
  module Dummy
@@ -18,11 +18,6 @@ module Dummy
18
18
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
20
  # config.i18n.default_locale = :de
21
-
22
-
23
- # Old stuff
24
- config.encoding = "utf-8"
25
- config.assets.enabled = true
26
- config.assets.version = '1.0'
27
21
  end
28
22
  end
23
+
@@ -1,6 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
-
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
6
5
  $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the Rails application.
5
- Dummy::Application.initialize!
5
+ Rails.application.initialize!
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
@@ -19,11 +19,19 @@ Dummy::Application.configure do
19
19
  # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Raise an error on page load if there are pending migrations
22
+ # Raise an error on page load if there are pending migrations.
23
23
  config.active_record.migration_error = :page_load
24
24
 
25
25
  # Debug mode disables concatenation and preprocessing of assets.
26
26
  # This option may cause significant delays in view rendering with a large
27
27
  # number of complex assets.
28
28
  config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
29
37
  end
@@ -1,11 +1,11 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
7
  # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both thread web servers
8
+ # your application in memory, allowing both threaded web servers
9
9
  # and those relying on copy on write to perform better.
10
10
  # Rake tasks automatically ignore this option for performance.
11
11
  config.eager_load = true
@@ -32,8 +32,7 @@ Dummy::Application.configure do
32
32
  # Generate digests for assets URLs.
33
33
  config.assets.digest = true
34
34
 
35
- # Version of your assets, change this if you want to expire all your assets.
36
- config.assets.version = '1.0'
35
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
37
36
 
38
37
  # Specifies the header that your server uses for sending files.
39
38
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
@@ -57,16 +56,12 @@ Dummy::Application.configure do
57
56
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
58
57
  # config.action_controller.asset_host = "http://assets.example.com"
59
58
 
60
- # Precompile additional assets.
61
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
- # config.assets.precompile += %w( search.js )
63
-
64
59
  # Ignore bad email addresses and do not raise email delivery errors.
65
60
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
66
61
  # config.action_mailer.raise_delivery_errors = false
67
62
 
68
63
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
69
- # the I18n.default_locale when a translation can not be found).
64
+ # the I18n.default_locale when a translation cannot be found).
70
65
  config.i18n.fallbacks = true
71
66
 
72
67
  # Send deprecation notices to registered listeners.
@@ -77,4 +72,7 @@ Dummy::Application.configure do
77
72
 
78
73
  # Use default logging formatter so that PID and timestamp are not suppressed.
79
74
  config.log_formatter = ::Logger::Formatter.new
75
+
76
+ # Do not dump schema after migrations.
77
+ config.active_record.dump_schema_after_migration = false
80
78
  end
@@ -1,4 +1,4 @@
1
- Dummy::Application.configure do
1
+ Rails.application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
@@ -14,7 +14,7 @@ Dummy::Application.configure do
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
16
  config.serve_static_assets = true
17
- config.static_cache_control = "public, max-age=3600"
17
+ config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
20
20
  config.consider_all_requests_local = true
@@ -33,4 +33,7 @@ Dummy::Application.configure do
33
33
 
34
34
  # Print deprecation notices to the stderr.
35
35
  config.active_support.deprecation = :stderr
36
+
37
+ # Raises error for missing translations
38
+ # config.action_view.raise_on_missing_translations = true
36
39
  end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,10 @@
1
+ development:
2
+ secret_key_base: d61c1f2b3e62e0a361915489159b199d7ee5326f280f08c5351f947aaeee33a6687e5219bb995147450a7a2905d6340e290de04fecbc10663743271183b7a2d6
3
+
4
+ test:
5
+ secret_key_base: 0844f902ca7927b7b59e7944e0771b8089ac87717750395210051fcf8b1eff849b8e6a9d3a8bd2f41a07fbae0c24c8c37cf0b76d96f6ab33be0ec2b433ddca85
6
+
7
+ # Do not keep production secrets in the repository,
8
+ # instead read values from the environment.
9
+ production:
10
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
Binary file
@@ -7,32 +7,32 @@ describe "Order" do
7
7
 
8
8
  it 'should be created' do
9
9
  visit "/orders"
10
- page.should have_content("is empty")
10
+ expect(page).to have_content("is empty")
11
11
 
12
12
  click_link "Create"
13
13
  fill_in "Name", :with => "a name"
14
14
  click_button "Create"
15
- page.should have_content("Order created.")
16
- page.should have_content("Editing Order")
15
+ expect(page).to have_content("Order created.")
16
+ expect(page).to have_content("Editing Order")
17
17
 
18
- Order.all.first.name.should == "a name"
18
+ expect(Order.all.first.name).to eq("a name")
19
19
  end
20
20
 
21
21
  it 'should be deleted' do
22
22
  Order.create
23
23
  n = Order.all.length
24
24
  visit "/orders"
25
- page.should have_content("Listing Order")
25
+ expect(page).to have_content("Listing Order")
26
26
 
27
27
  click_link "Delete"
28
- page.should have_content("Order deleted.")
29
- Order.all.length.should == (n - 1)
28
+ expect(page).to have_content("Order deleted.")
29
+ expect(Order.all.length).to eq((n - 1))
30
30
  end
31
31
 
32
32
  it 'index should have check_box for multi_selection' do
33
33
  Order.create :name => 'name', :qty => 123
34
34
  visit "/orders"
35
- page.should have_css('table tr input[name="multi_selection[]"]')
35
+ expect(page).to have_css('table tr input[name="multi_selection[]"]')
36
36
  end
37
37
 
38
38
  it 'should be copied' do
@@ -41,14 +41,14 @@ describe "Order" do
41
41
  n = Order.all.length
42
42
  visit "/orders/#{order.id}/copy"
43
43
 
44
- page.should have_content("New")
44
+ expect(page).to have_content("New")
45
45
  fill_in "Name", :with => "a name"
46
46
  click_button "OK"
47
47
 
48
- Order.all.length.should == (n + 1)
48
+ expect(Order.all.length).to eq(n + 1)
49
49
  order2 = Order.find(order.id + 1)
50
- order2.name.should_not == order.name
51
- order2.qty.should == order.qty
50
+ expect(order2.name).to_not eq(order.name)
51
+ expect(order2.qty).to eq(order.qty)
52
52
  end
53
53
 
54
54
  end
@@ -2,6 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe Order do
4
4
  it 'supports method all' do
5
- Order.should respond_to(:all)
5
+ expect(Order).to respond_to(:all)
6
6
  end
7
7
  end
data/spec/spec_helper.rb CHANGED
@@ -22,6 +22,8 @@ Spork.prefork do
22
22
  # increases speed; not sure why
23
23
  config.use_transactional_fixtures = true
24
24
 
25
+ config.include(Capybara::DSL)
26
+ config.infer_spec_type_from_file_location!
25
27
  ActiveSupport::Dependencies.clear
26
28
  end
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rows_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-02 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3
@@ -102,6 +102,9 @@ files:
102
102
  - spec/dummy/app/models/order.rb
103
103
  - spec/dummy/app/views/layouts/application.html.erb
104
104
  - spec/dummy/app/views/orders/_form.html.erb
105
+ - spec/dummy/bin/bundle
106
+ - spec/dummy/bin/rails
107
+ - spec/dummy/bin/rake
105
108
  - spec/dummy/config.ru
106
109
  - spec/dummy/config/application.rb
107
110
  - spec/dummy/config/boot.rb
@@ -110,9 +113,11 @@ files:
110
113
  - spec/dummy/config/environments/development.rb
111
114
  - spec/dummy/config/environments/production.rb
112
115
  - spec/dummy/config/environments/test.rb
116
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
113
117
  - spec/dummy/config/initializers/secret_token.rb
114
118
  - spec/dummy/config/initializers/session_store.rb
115
119
  - spec/dummy/config/routes.rb
120
+ - spec/dummy/config/secrets.yml
116
121
  - spec/dummy/db/migrate/001_create_orders.rb
117
122
  - spec/dummy/db/schema.rb
118
123
  - spec/dummy/db/test.sqlite3
@@ -142,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
147
  version: '0'
143
148
  requirements: []
144
149
  rubyforge_project:
145
- rubygems_version: 2.2.1
150
+ rubygems_version: 2.4.2
146
151
  signing_key:
147
152
  specification_version: 4
148
153
  summary: RowsController DRYs your controllers.