focused_controller 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64bbf1cbd70b5c981b090907d47cb17ccae247cc
4
- data.tar.gz: 7dd77442333a3cc8786f4a6664ff5ab3f251c15c
3
+ metadata.gz: eb0b82cc33ac4d72d02c04f0d5e5d80d3277f659
4
+ data.tar.gz: aa5cb4c9903708ed68c1615c1e47ce018cb18723
5
5
  SHA512:
6
- metadata.gz: ca4d406ffce23448c7bb478933f08cb3bfc9c6bb237a75659dc53c033d3ed4749d8cb67e64bc6b2135e7f3bac28d1b82e978c1f10365822114d21f67e59aff1b
7
- data.tar.gz: 816e20545e95ee31b1dbf9710eba3002876ec1145601925250ca62daf051544de8d2e13b10ea23e901f2e8068d4643c0d2a3cbba0a3ac831463a9f091731d629
6
+ metadata.gz: ac7e1861452ca3ba23d540d843e0b621e75a7d47bee8997c5fc34fb81da3112e918a154377574c6859a9a0c4dae93cf38089594ae20c343c10ee19436e7b8c7f
7
+ data.tar.gz: 6d1c7de6432fb55c7ba93f1f7ca574df848a11e7a3ab6bee4706f34d2ce587d55e8dd1e3cb1ec3c2550cfb9f465c34648e0024a11d42ff33382d1480fe83ff9f
@@ -1,9 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.2
3
4
  - 2.0.0
4
5
  - 1.9.3
5
6
  - jruby-19mode
6
7
  gemfile:
8
+ - gemfiles/rails_4_1.gemfile
7
9
  - gemfiles/rails_4_0.gemfile
8
10
  - gemfiles/rails_3_2.gemfile
9
11
  - gemfiles/rails_3_1.gemfile
data/Appraisals CHANGED
@@ -1,3 +1,8 @@
1
+ appraise 'rails-4-1' do
2
+ gem 'rails', '~> 4.1.0'
3
+ gem 'minitest', '~> 5.1.0'
4
+ end
5
+
1
6
  appraise 'rails-4-0' do
2
7
  gem 'rails', '~> 4.0.0'
3
8
  end
@@ -1,3 +1,7 @@
1
+ ## Version 1.2.0 ##
2
+
3
+ * Rails 4.1 support
4
+
1
5
  ## Version 1.1.1 ##
2
6
 
3
7
  * Fix issue with `url_for` in Rails 4.0.1
@@ -18,13 +18,13 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency 'actionpack', '>= 3.0', '< 4.1'
21
+ s.add_dependency 'actionpack', '>= 3.0', '<= 4.1'
22
22
 
23
- s.add_development_dependency 'minitest', '~> 4.2'
23
+ s.add_development_dependency 'minitest'
24
24
  s.add_development_dependency 'capybara', '~> 2.1'
25
25
  s.add_development_dependency 'capybara_minitest_spec', '~> 1.0'
26
26
  s.add_development_dependency 'poltergeist', '~> 1.3'
27
27
  s.add_development_dependency 'rspec', '~> 2.8'
28
28
  s.add_development_dependency 'rspec-rails', '~> 2.8'
29
- s.add_development_dependency 'appraisal', '~> 0.4'
29
+ s.add_development_dependency 'appraisal', '~> 1.0'
30
30
  end
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+ gem "minitest", "~> 5.1.0"
7
+
8
+ gemspec :path => "../"
@@ -5,6 +5,7 @@ begin
5
5
  # Requiring specific files rather than just 'rspec/rails' because I don't
6
6
  # want to force the configuration that 'rspec/rails' adds on people if they
7
7
  # haven't specifically chosen to receive it.
8
+ require 'rails/version' unless defined?(Rails)
8
9
  require 'rspec/rails/matchers'
9
10
  require 'rspec/rails/adapters'
10
11
  rescue LoadError
@@ -1,3 +1,3 @@
1
1
  module FocusedController
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -66,7 +66,13 @@ describe 'acceptance test' do
66
66
  # actually run the test.
67
67
  def start_server
68
68
  within_test_app do
69
- IO.popen("bundle exec rails s -p #{FocusedController::Test.port} 2>&1") do |out|
69
+ command = if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('4.1.0')
70
+ "bundle exec rails s -p #{FocusedController::Test.port} 2>&1"
71
+ else
72
+ "./bin/rails s -p #{FocusedController::Test.port} 2>&1"
73
+ end
74
+
75
+ IO.popen(command) do |out|
70
76
  start = Time.now
71
77
  started = false
72
78
  output = ""
@@ -2,5 +2,5 @@ source 'http://rubygems.org'
2
2
 
3
3
  gem 'rails', ENV['RAILS_VERSION'] || '~> 4.0.0'
4
4
  gem 'focused_controller', :path => '../..'
5
- gem 'rspec'
5
+ gem 'rspec', '~> 2.14.1'
6
6
  gem 'rspec-rails'
@@ -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
@@ -11,6 +11,7 @@ module App
11
11
  config.encoding = "utf-8"
12
12
  end
13
13
  end
14
+ I18n.enforce_available_locales = false
14
15
 
15
16
  # Check out the awesome database
16
17
  POSTS = []
@@ -1,5 +1,4 @@
1
1
  require 'bundler/setup'
2
- require 'test/unit'
3
2
  require 'active_support/test_case'
4
3
  require 'focused_controller/test_helper'
5
4
 
@@ -1,4 +1,7 @@
1
1
  require 'bundler/setup'
2
+ gem 'minitest'
3
+ require 'active_support'
4
+ require 'minitest/autorun'
2
5
  require 'test/unit/testcase'
3
6
  require 'active_support/test_case'
4
7
  require 'minitest/spec'
@@ -7,6 +10,7 @@ require 'focused_controller'
7
10
  require 'pathname'
8
11
  require 'ostruct'
9
12
  require 'rspec/core'
13
+ require 'rails/version'
10
14
 
11
15
  TEST_ROOT = File.expand_path('..', __FILE__)
12
16
 
@@ -14,29 +18,3 @@ TEST_ROOT = File.expand_path('..', __FILE__)
14
18
  module RSpec::Core::DSL
15
19
  remove_method :describe
16
20
  end
17
-
18
- # Annoying monkey-patches. "require 'rspec/rails'" pulls in 'capybara/rails', if it
19
- # can, and capybara/rails assumes there is a full rails env present. So this is a
20
- # hack to make it not fail.
21
- module Rails
22
- module VERSION
23
- MAJOR = 3
24
- MINOR = 0
25
- TINY = 0
26
- PRE = ""
27
-
28
- STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
29
- end
30
-
31
- def self.version
32
- VERSION::STRING
33
- end
34
-
35
- def self.root
36
- Pathname.new('')
37
- end
38
-
39
- def self.application
40
- OpenStruct.new(:env_config => {}, :env_defaults => {})
41
- end
42
- end
@@ -165,7 +165,11 @@ module FocusedController
165
165
  subject.flash[:foo].must_equal 'omg'
166
166
 
167
167
  # This is consistent with the behaviour of standard rails functional tests
168
- subject.flash['foo'].must_equal nil
168
+ if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('4.1.0')
169
+ subject.flash['foo'].must_equal nil
170
+ else
171
+ subject.flash['foo'].must_equal 'omg'
172
+ end
169
173
  end
170
174
 
171
175
  it 'supports cookies' do
metadata CHANGED
@@ -1,133 +1,133 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: focused_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-23 00:00:00.000000000 Z
11
+ date: 2014-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
- - - <
20
+ - - "<="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '4.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
- - - <
30
+ - - "<="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '4.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: minitest
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ~>
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '4.2'
39
+ version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ~>
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '4.2'
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capybara
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '2.1'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '2.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: capybara_minitest_spec
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '1.0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ~>
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '1.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: poltergeist
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.3'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.3'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rspec
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ~>
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '2.8'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '2.8'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rspec-rails
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ~>
107
+ - - "~>"
108
108
  - !ruby/object:Gem::Version
109
109
  version: '2.8'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ~>
114
+ - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: '2.8'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: appraisal
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ~>
121
+ - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '0.4'
123
+ version: '1.0'
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ~>
128
+ - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '0.4'
130
+ version: '1.0'
131
131
  description: Write Rails controllers with one class per action
132
132
  email:
133
133
  - j@jonathanleighton.com
@@ -135,8 +135,8 @@ executables: []
135
135
  extensions: []
136
136
  extra_rdoc_files: []
137
137
  files:
138
- - .gitignore
139
- - .travis.yml
138
+ - ".gitignore"
139
+ - ".travis.yml"
140
140
  - Appraisals
141
141
  - CHANGELOG.md
142
142
  - Gemfile
@@ -147,6 +147,7 @@ files:
147
147
  - gemfiles/rails_3_1.gemfile
148
148
  - gemfiles/rails_3_2.gemfile
149
149
  - gemfiles/rails_4_0.gemfile
150
+ - gemfiles/rails_4_1.gemfile
150
151
  - lib/focused_controller.rb
151
152
  - lib/focused_controller/action_name.rb
152
153
  - lib/focused_controller/functional_test_helper.rb
@@ -173,6 +174,9 @@ files:
173
174
  - test/app/app/views/posts/index.html.erb
174
175
  - test/app/app/views/posts/new.html.erb
175
176
  - test/app/app/views/posts/show.html.erb
177
+ - test/app/bin/bundle
178
+ - test/app/bin/rails
179
+ - test/app/bin/rake
176
180
  - test/app/config.ru
177
181
  - test/app/config/application.rb
178
182
  - test/app/config/boot.rb
@@ -232,17 +236,17 @@ require_paths:
232
236
  - lib
233
237
  required_ruby_version: !ruby/object:Gem::Requirement
234
238
  requirements:
235
- - - '>='
239
+ - - ">="
236
240
  - !ruby/object:Gem::Version
237
241
  version: '0'
238
242
  required_rubygems_version: !ruby/object:Gem::Requirement
239
243
  requirements:
240
- - - '>='
244
+ - - ">="
241
245
  - !ruby/object:Gem::Version
242
246
  version: '0'
243
247
  requirements: []
244
248
  rubyforge_project: focused_controller
245
- rubygems_version: 2.1.9
249
+ rubygems_version: 2.2.2
246
250
  signing_key:
247
251
  specification_version: 4
248
252
  summary: Write Rails controllers with one class per action
@@ -262,6 +266,9 @@ test_files:
262
266
  - test/app/app/views/posts/index.html.erb
263
267
  - test/app/app/views/posts/new.html.erb
264
268
  - test/app/app/views/posts/show.html.erb
269
+ - test/app/bin/bundle
270
+ - test/app/bin/rails
271
+ - test/app/bin/rake
265
272
  - test/app/config.ru
266
273
  - test/app/config/application.rb
267
274
  - test/app/config/boot.rb
@@ -312,4 +319,3 @@ test_files:
312
319
  - test/unit/rspec_functional_helper.rb
313
320
  - test/unit/rspec_helper_test.rb
314
321
  - test/unit/test_helper_test.rb
315
- has_rdoc: