selections 0.2.2 → 1.0.0

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.
data/.gitignore CHANGED
@@ -15,4 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
- .idea/
18
+ .idea/
19
+ *.lock
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.1
6
+ gemfile:
7
+ - gemfiles/3.2.gemfile
8
+ - gemfiles/4.0.gemfile
9
+ - gemfiles/4.1.gemfile
10
+
11
+ matrix:
12
+ exclude:
13
+ # rails < 3.2 is unsupported on ruby 2.0
14
+ - rvm: 2.0.0
15
+ gemfile: gemfiles/3.2.gemfile
data/Appraisals ADDED
@@ -0,0 +1,14 @@
1
+ appraise "3.2" do
2
+ gem "rails", "~> 3.2.15"
3
+ gemspec
4
+ end
5
+
6
+ appraise "4.0" do
7
+ gem "rails", "~> 4.0.0"
8
+ gemspec
9
+ end
10
+
11
+ appraise "4.1" do
12
+ gem "rails", "~> 4.1.0"
13
+ gemspec
14
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
- ## 0.2.2
1
+ ## 1.0.0
2
2
  * https://github.com/nigelr/selections/pull/14 - Update selections to no longer use hash rocket syntax.
3
+ * https://github.com/nigelr/selections/pull/17 - Add rails 4 support, include appraisals gem and travis
4
+ * https://github.com/nigelr/selections/pull/18 - Update readme to provide instructions on boot.rb
5
+ * https://github.com/nigelr/selections/pull/19 - Update generators for Rails 3 or 4
6
+ * https://github.com/nigelr/selections/pull/20 - Return first default item in a group #13
3
7
 
4
8
  ## 0.2.1
5
9
  * Check the existence of the selections table in `belongs_to_selection` so it is safe to use during rake tasks like db:reset.
data/README.md CHANGED
@@ -29,6 +29,10 @@ Or install it yourself as:
29
29
 
30
30
  $ gem install selections
31
31
 
32
+ Add this line to `config/boot.rb` under `require 'bundler/setup' ...` if using Rspec in your project
33
+
34
+ ENV["FIXTURES_PATH"] ||= 'spec/fixtures'
35
+
32
36
  ## Usage
33
37
 
34
38
  ### Generator
@@ -184,13 +188,17 @@ eg: show.html.erb
184
188
  Selections supports lookup using the boolean ? method, as an example:
185
189
 
186
190
  instead of needing to do
191
+
187
192
  ```ruby
188
193
  if @ticket.priority == Selection.ticket_priority_high
189
194
  ```
195
+
190
196
  you can check directly on the instance:
197
+
191
198
  ```ruby
192
199
  if @ticket.priority_high?
193
200
  ```
201
+
194
202
  Thanks to @mattconnolly
195
203
 
196
204
  ## Automatic Features
@@ -235,15 +243,15 @@ priority_high:
235
243
  name: Priorities
236
244
  system_code: priority_high
237
245
  parent: priority
238
- ```
246
+ ```
239
247
  ### In Factory
240
248
  Don't do this as it will need a DB lookup
241
249
  ```ruby
242
- priority: { Selection.priority_high }
250
+ priority: { Selection.priority_high }
243
251
  ```
244
252
  Do this as it will be much quicker
245
253
  ```ruby
246
- priority_id: { Selection.label_to_id(:priority_high) }
254
+ priority_id: { Selection.label_to_id(:priority_high) }
247
255
  ```
248
256
 
249
257
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
1
3
  require "bundler/gem_tasks"
2
4
  require 'rspec/core/rake_task'
3
5
 
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.15"
6
+ gem "shoulda-matchers"
7
+ gem "selections", :path => "../"
8
+
9
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0.0"
6
+ gem "shoulda-matchers"
7
+ gem "selections", :path => "../"
8
+
9
+ gemspec :path => "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0.beta"
6
+ gem "shoulda-matchers"
7
+ gem "selections", :path => "../"
8
+
9
+ gemspec :path => "../"
@@ -14,7 +14,6 @@ class SelectionsScaffoldGenerator < Rails::Generators::Base
14
14
  def generate_selections_scaffold
15
15
  {
16
16
  'selection_spec.rb' => 'spec/models/',
17
- 'selection.rb' => 'app/models/',
18
17
  'selections_controller_spec.rb' => 'spec/controllers/',
19
18
  'selections_controller.rb' => 'app/controllers/',
20
19
  'selections_helper.rb' => 'app/helpers/',
@@ -27,9 +26,16 @@ class SelectionsScaffoldGenerator < Rails::Generators::Base
27
26
  copy_file file, dir + file
28
27
  end
29
28
 
29
+ model_source =
30
+ if ActiveRecord::VERSION::MAJOR >= 4
31
+ 'selection.rb'
32
+ else
33
+ 'selection_rails3.rb'
34
+ end
35
+ copy_file model_source, 'app/models/selection.rb'
36
+
30
37
  migration_template 'create_selections.rb', 'db/migrate/create_selections.rb'
31
38
 
32
39
  route 'resources(:selections, only: :index) { resources :selections, except: :show }'
33
-
34
40
  end
35
- end
41
+ end
@@ -1,5 +1,3 @@
1
1
  class Selection < ActiveRecord::Base
2
- attr_accessible :archived, :is_default, :is_system, :name, :parent_id, :position_value, :system_code
3
-
4
2
  selectable
5
3
  end
@@ -0,0 +1,5 @@
1
+ class Selection < ActiveRecord::Base
2
+ attr_accessible :archived, :is_default, :is_system, :name, :parent_id, :position_value, :system_code
3
+
4
+ selectable
5
+ end
@@ -16,15 +16,15 @@ module Selections
16
16
  validates_presence_of :name
17
17
  validates_uniqueness_of :name, scope: :parent_id
18
18
  validates_uniqueness_of :system_code, scope: :archived_at
19
- validates_format_of :system_code, :with => /^[a-z][a-zA-Z_0-9]*$/, :message => "can only contain alphanumeric characters and '_', not spaces"
19
+ validates_format_of :system_code, :with => /\A[a-z][a-zA-Z_0-9]*\Z/, :message => "can only contain alphanumeric characters and '_', not spaces"
20
20
 
21
21
  before_validation :auto_gen_system_code, on: :create
22
22
  before_validation :disable_system_code_change, on: :update
23
23
  after_validation :check_defaults
24
24
 
25
- default_scope :order => [:position_value, :name]
25
+ default_scope { order([:position_value, :name]) }
26
26
 
27
- scope :filter_archived_except_selected, lambda { |selected_id| {:conditions => ["archived_at is ? or id = ?", nil, selected_id.to_i]} }
27
+ scope :filter_archived_except_selected, lambda { |selected_id| where(["archived_at is ? or id = ?", nil, selected_id.to_i]) }
28
28
  end
29
29
 
30
30
  module ClassMethods
@@ -73,7 +73,13 @@ module Selections
73
73
  # priority_id: { Selection.label_to_id(:priority_high) } <== This will be much quicker
74
74
  #
75
75
  def label_to_id(label)
76
- ActiveRecord::Fixtures.identify(label)
76
+ # ActiveRecord::FixtureSet replaces ActiveRecord::Fixtures in Rails 4
77
+ # This helps to ensure backwards compatibility
78
+ if ActiveRecord::VERSION::MAJOR >= 4
79
+ ActiveRecord::FixtureSet.identify(label)
80
+ else
81
+ ActiveRecord::Fixtures.identify(label)
82
+ end
77
83
  end
78
84
  end
79
85
 
@@ -136,6 +142,12 @@ module Selections
136
142
  def sub_children
137
143
  children.flat_map(&:children)
138
144
  end
145
+
146
+ # returns first default item in list e.g. Selection.priorities.default
147
+ def default
148
+ children.where(:is_default => true).order(:position_value).first
149
+ end
150
+
139
151
  end
140
152
 
141
153
  def selectable #:nodoc:
@@ -1,3 +1,3 @@
1
1
  module Selections
2
- VERSION = '0.2.2'
2
+ VERSION = '1.0.0'
3
3
  end
data/selections.gemspec CHANGED
@@ -26,13 +26,17 @@ Gem::Specification.new do |gem|
26
26
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
27
27
  gem.require_paths = ["lib"]
28
28
 
29
- gem.add_dependency 'activerecord', '~> 3.0'
30
- gem.add_dependency 'actionpack', '~> 3.0'
31
- gem.add_dependency 'acts_as_tree', '~> 1.2.0'
29
+ gem.add_dependency('activerecord', ">= 3.0")
30
+ gem.add_dependency('activesupport', ">= 3.0")
31
+ gem.add_dependency('actionpack', ">= 3.0")
32
+ gem.add_dependency 'acts_as_tree', '~> 1.6.0'
32
33
 
33
34
  gem.add_development_dependency 'rake'
34
35
  gem.add_development_dependency 'rspec'
36
+ gem.add_development_dependency 'appraisal'
35
37
  gem.add_development_dependency 'sqlite3'
36
38
  gem.add_development_dependency 'nokogiri'
37
- gem.add_development_dependency "shoulda-matchers", "~> 2.4.0"
39
+ gem.add_development_dependency 'generator_spec'
40
+ gem.add_development_dependency 'minitest'
41
+ gem.add_development_dependency 'shoulda-matchers', ">= 2.4.0"
38
42
  end
@@ -0,0 +1,81 @@
1
+ require 'spec_helper'
2
+ require 'fileutils'
3
+ require 'generator_spec'
4
+ require 'generators/selections_scaffold/selections_scaffold_generator'
5
+
6
+ describe SelectionsScaffoldGenerator do
7
+
8
+ destination File.expand_path("../../../../tmp", __FILE__)
9
+
10
+ before :all do
11
+ prepare_destination
12
+ # the generator requires the config/routes.rb file to exist. Let's create one:
13
+ create_routes_file
14
+ run_generator
15
+ end
16
+
17
+ def create_routes_file
18
+ @dir = self.class.test_case.destination_root
19
+ FileUtils.mkdir_p File.join(@dir, "config")
20
+ config = <<-EOF
21
+ Some::Application.routes.draw do
22
+ root to: "home#index"
23
+ end
24
+ EOF
25
+ File.write File.join(@dir, "config", "routes.rb"), config
26
+ end
27
+
28
+ def file_path(path)
29
+ File.join(@dir, path)
30
+ end
31
+
32
+ def file_contents(path)
33
+ File.read(file_path(path))
34
+ end
35
+
36
+ it "creates the routes" do
37
+ expect(file_contents('config/routes.rb')).to include("resources(:selections, only: :index) { resources :selections, except: :show }")
38
+ end
39
+
40
+ context "check files" do
41
+ %w[
42
+ app/controllers/selections_controller.rb
43
+ app/helpers/selections_helper.rb
44
+ app/models/selection.rb
45
+ app/views/selections/_form.html.haml
46
+ app/views/selections/edit.html.haml
47
+ app/views/selections/index.html.haml
48
+ app/views/selections/new.html.haml
49
+ config/routes.rb
50
+ spec/controllers/selections_controller_spec.rb
51
+ spec/fixtures/selections.yml
52
+ spec/models/selection_spec.rb
53
+ ].each do |file|
54
+ it "created #{file}" do
55
+ path = File.join(@dir, file)
56
+ expect(File.exist?(path)).to be_true
57
+ end
58
+ end
59
+ end
60
+
61
+ it "created one model" do
62
+ expect(Dir["#{@dir}/app/models/*.rb"].count).to eq(1)
63
+ end
64
+
65
+ it "creates a migration" do
66
+ expect(Dir["#{@dir}/db/migrate/*.rb"].count).to eq(1)
67
+ end
68
+
69
+ it "used the correct model" do
70
+ model = file_contents("app/models/selection.rb")
71
+ if ActiveRecord::VERSION::MAJOR == 3
72
+ expect(model).to include("attr_accessible")
73
+ else
74
+ expect(model).not_to include("attr_accessible")
75
+ end
76
+ end
77
+
78
+ it "created the routes" do
79
+ expect(file_contents('config/routes.rb')).to include("resources(:selections, only: :index) { resources :selections, except: :show }")
80
+ end
81
+ end
@@ -40,10 +40,15 @@ describe Selections do
40
40
  end
41
41
  end
42
42
 
43
- describe '#fixture_id' do
43
+ describe '#label_to_id' do
44
44
  context 'returns ID without DB access' do
45
- it { expect(Selection.label_to_id('priority_high')).to eq ActiveRecord::Fixtures.identify(:priority_high) }
46
- it { expect(Selection.label_to_id(:priority_high)).to eq ActiveRecord::Fixtures.identify(:priority_high) }
45
+ if ActiveRecord::VERSION::MAJOR >= 4
46
+ it { expect(Selection.label_to_id('priority_high')).to eq ActiveRecord::FixtureSet.identify(:priority_high) }
47
+ it { expect(Selection.label_to_id(:priority_high)).to eq ActiveRecord::FixtureSet.identify(:priority_high) }
48
+ else
49
+ it { expect(Selection.label_to_id('priority_high')).to eq ActiveRecord::Fixtures.identify(:priority_high) }
50
+ it { expect(Selection.label_to_id(:priority_high)).to eq ActiveRecord::Fixtures.identify(:priority_high) }
51
+ end
47
52
  end
48
53
  end
49
54
 
@@ -207,6 +212,26 @@ describe Selections do
207
212
  end
208
213
  end
209
214
 
215
+ describe "#default" do
216
+ context "returns default selection from list" do
217
+ before do
218
+ parent; selection_1; selection_2; selection_3;
219
+ selection_2.update_attribute(:is_default, true)
220
+ end
221
+ it { expect(Selection.priority.default).to eq(selection_2) }
222
+ end
223
+ context "returns nil if no children" do
224
+ before { parent }
225
+ it { expect(Selection.priority.default).to eq(nil) }
226
+ end
227
+ context "returns nil if none set as default" do
228
+ before do
229
+ parent; selection_1; selection_2; selection_3;
230
+ end
231
+ it { expect(Selection.priority.default).to eq(nil) }
232
+ end
233
+ end
234
+
210
235
  context "selecting" do
211
236
  before do
212
237
  selection_1
@@ -26,7 +26,13 @@ describe SelectionTag do
26
26
  let(:selection_1) { Selection.create(name: "low", parent_id: parent.id) }
27
27
  let(:selection_2) { Selection.create(name: "medium", parent_id: parent.id) }
28
28
  let(:selection_3) { Selection.create(name: "high", parent_id: parent.id) }
29
- let(:form) { ActionView::Helpers::FormBuilder.new(:ticket, ticket, ActionView::Base.new, {}, Proc.new {}) }
29
+ if ActiveRecord::VERSION::MAJOR >= 4
30
+ let(:form) { ActionView::Helpers::FormBuilder.new(:ticket, ticket, ActionView::Base.new, {}) }
31
+ let(:form_user) { ActionView::Helpers::FormBuilder.new(:user, :user, ActionView::Base.new, {}) }
32
+ else
33
+ let(:form) { ActionView::Helpers::FormBuilder.new(:ticket, ticket, ActionView::Base.new, {}, Proc.new {}) }
34
+ let(:form_user) { ActionView::Helpers::FormBuilder.new(:user, :user, ActionView::Base.new, {}, Proc.new {}) }
35
+ end
30
36
  let(:ticket) { Ticket.create(:name => "railscamp") }
31
37
  let(:all_selections) do
32
38
  parent
@@ -45,7 +51,7 @@ describe SelectionTag do
45
51
  before { model_parent }
46
52
  it("should find more explicit route of model parent") { expect(edit_form.system_code).to eq(model_parent) }
47
53
  it "should use priority system_code when model is not ticket" do
48
- expect(edit_form(form: ActionView::Helpers::FormBuilder.new(:user, :user, ActionView::Base.new, {}, Proc.new {})).system_code).to eq(parent)
54
+ expect(edit_form(form: form_user ).system_code).to eq(parent)
49
55
  end
50
56
  end
51
57
  end
@@ -68,7 +74,7 @@ describe SelectionTag do
68
74
  before { all_selections }
69
75
 
70
76
  it "returns all children items" do
71
- expect(edit_form.items.all).to eq(parent.children)
77
+ expect(edit_form.items.to_a).to eq(parent.children)
72
78
  end
73
79
  context "archived" do
74
80
  before { selection_2.update_attribute(:archived, "1") }
@@ -77,7 +83,7 @@ describe SelectionTag do
77
83
  end
78
84
  it "returns archived items when selected" do
79
85
  ticket.update_attribute(:priority_id, selection_2.id)
80
- expect(edit_form.items.all).to eq(parent.children)
86
+ expect(edit_form.items.to_a).to eq(parent.children)
81
87
  end
82
88
  end
83
89
  end
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,11 @@ require 'selections'
2
2
  require "nokogiri"
3
3
  require 'active_record/fixtures'
4
4
 
5
+ if ActiveRecord::VERSION::MAJOR == 3
6
+ # Rails 3 has some big warning that prints out if this is not there, but this will break Rails 4. :(
7
+ require 'minitest'
8
+ end
9
+
5
10
  ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
6
11
  ActiveRecord::Migration.create_table :selections do |t|
7
12
  t.string :name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selections
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,14 +9,14 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-10 00:00:00.000000000 Z
12
+ date: 2014-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '3.0'
22
22
  type: :runtime
@@ -24,7 +24,23 @@ dependencies:
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: activesupport
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '3.0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
28
44
  - !ruby/object:Gem::Version
29
45
  version: '3.0'
30
46
  - !ruby/object:Gem::Dependency
@@ -32,7 +48,7 @@ dependencies:
32
48
  requirement: !ruby/object:Gem::Requirement
33
49
  none: false
34
50
  requirements:
35
- - - ~>
51
+ - - ! '>='
36
52
  - !ruby/object:Gem::Version
37
53
  version: '3.0'
38
54
  type: :runtime
@@ -40,7 +56,7 @@ dependencies:
40
56
  version_requirements: !ruby/object:Gem::Requirement
41
57
  none: false
42
58
  requirements:
43
- - - ~>
59
+ - - ! '>='
44
60
  - !ruby/object:Gem::Version
45
61
  version: '3.0'
46
62
  - !ruby/object:Gem::Dependency
@@ -50,7 +66,7 @@ dependencies:
50
66
  requirements:
51
67
  - - ~>
52
68
  - !ruby/object:Gem::Version
53
- version: 1.2.0
69
+ version: 1.6.0
54
70
  type: :runtime
55
71
  prerelease: false
56
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +74,7 @@ dependencies:
58
74
  requirements:
59
75
  - - ~>
60
76
  - !ruby/object:Gem::Version
61
- version: 1.2.0
77
+ version: 1.6.0
62
78
  - !ruby/object:Gem::Dependency
63
79
  name: rake
64
80
  requirement: !ruby/object:Gem::Requirement
@@ -91,6 +107,22 @@ dependencies:
91
107
  - - ! '>='
92
108
  - !ruby/object:Gem::Version
93
109
  version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: appraisal
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
94
126
  - !ruby/object:Gem::Dependency
95
127
  name: sqlite3
96
128
  requirement: !ruby/object:Gem::Requirement
@@ -123,12 +155,44 @@ dependencies:
123
155
  - - ! '>='
124
156
  - !ruby/object:Gem::Version
125
157
  version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: generator_spec
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: minitest
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :development
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
126
190
  - !ruby/object:Gem::Dependency
127
191
  name: shoulda-matchers
128
192
  requirement: !ruby/object:Gem::Requirement
129
193
  none: false
130
194
  requirements:
131
- - - ~>
195
+ - - ! '>='
132
196
  - !ruby/object:Gem::Version
133
197
  version: 2.4.0
134
198
  type: :development
@@ -136,7 +200,7 @@ dependencies:
136
200
  version_requirements: !ruby/object:Gem::Requirement
137
201
  none: false
138
202
  requirements:
139
- - - ~>
203
+ - - ! '>='
140
204
  - !ruby/object:Gem::Version
141
205
  version: 2.4.0
142
206
  description: ! "Selection list management and form and view helpers.\n Manages one
@@ -151,11 +215,16 @@ extensions: []
151
215
  extra_rdoc_files: []
152
216
  files:
153
217
  - .gitignore
218
+ - .travis.yml
219
+ - Appraisals
154
220
  - CHANGELOG.md
155
221
  - Gemfile
156
222
  - LICENSE.txt
157
223
  - README.md
158
224
  - Rakefile
225
+ - gemfiles/3.2.gemfile
226
+ - gemfiles/4.0.gemfile
227
+ - gemfiles/4.1.gemfile
159
228
  - lib/generators/selections_scaffold/selections_scaffold_generator.rb
160
229
  - lib/generators/selections_scaffold/templates/_form.html.haml
161
230
  - lib/generators/selections_scaffold/templates/create_selections.rb
@@ -166,6 +235,7 @@ files:
166
235
  - lib/generators/selections_scaffold/templates/new.html.erb
167
236
  - lib/generators/selections_scaffold/templates/new.html.haml
168
237
  - lib/generators/selections_scaffold/templates/selection.rb
238
+ - lib/generators/selections_scaffold/templates/selection_rails3.rb
169
239
  - lib/generators/selections_scaffold/templates/selection_spec.rb
170
240
  - lib/generators/selections_scaffold/templates/selections.yml
171
241
  - lib/generators/selections_scaffold/templates/selections_controller.rb
@@ -177,6 +247,7 @@ files:
177
247
  - lib/selections/selectable.rb
178
248
  - lib/selections/version.rb
179
249
  - selections.gemspec
250
+ - spec/lib/generators/selections_scaffold_generator_spec.rb
180
251
  - spec/selections/belongs_to_selection_spec.rb
181
252
  - spec/selections/selectable_spec.rb
182
253
  - spec/selections/selections_tag_spec.rb
@@ -209,6 +280,7 @@ summary: Selection list management and form and view helpers. Manages one table
209
280
  or children ( eg. Selection.priorities ). Form helper to display lists ( eg. f.selections
210
281
  :priorities ). Handling of archived items ( displaying if selected only ).
211
282
  test_files:
283
+ - spec/lib/generators/selections_scaffold_generator_spec.rb
212
284
  - spec/selections/belongs_to_selection_spec.rb
213
285
  - spec/selections/selectable_spec.rb
214
286
  - spec/selections/selections_tag_spec.rb