tableficate 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -9,7 +9,7 @@ This project follows [Semantic Versioning](http://semver.org/).
9
9
 
10
10
  If you're using Bundler, add this to your Gemfile:
11
11
 
12
- gem 'tableficate', '~0.2.0'
12
+ gem 'tableficate', '~>0.2.0'
13
13
 
14
14
  ## Support
15
15
 
@@ -65,7 +65,7 @@ In "app/tables/" we'll create a new table model using the generator. Provide the
65
65
  Our table model:
66
66
 
67
67
  class AccountReport < Tableficate::Base
68
- scope :accounts
68
+ scope :account
69
69
 
70
70
  default_sort :created_at, 'DESC'
71
71
 
data/changelog.markdown CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.1
2
+ * fix table generator to provide `scope` the proper argument and correct documentation
3
+
1
4
  ## 0.2.0
2
5
  * complete filter rewrite
3
6
  * replaced existing filter functions in table_for calls
@@ -1,5 +1,5 @@
1
1
  class <%= class_name %> < Tableficate::Base
2
2
  <% if scope -%>
3
- scope :<%= scope.tableize %>
3
+ scope :<%= scope.underscore %>
4
4
  <% end -%>
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module Tableficate
2
- VERSION = "0.2.0"
2
+ VERSION = '0.2.1'
3
3
  end
@@ -10,10 +10,18 @@ describe 'tableficate:table' do
10
10
  end
11
11
  end
12
12
 
13
- with_args :foo, :bars do
14
- it 'should generate app/tables/foo.rb' do
13
+ with_args :foo, :bar do
14
+ it 'should generate app/tables/foo.rb with a scope' do
15
+ subject.should generate('app/tables/foo.rb') { |content|
16
+ content.should =~ /scope \:bar/
17
+ }
18
+ end
19
+ end
20
+
21
+ with_args :foo, 'NobelPrizeWinner' do
22
+ it 'should generate app/tables/foo.rb with a scope based on the model' do
15
23
  subject.should generate('app/tables/foo.rb') { |content|
16
- content.should =~ /scope \:bars/
24
+ content.should =~ /scope \:nobel_prize_winner/
17
25
  }
18
26
  end
19
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tableficate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-06 00:00:00.000000000Z
12
+ date: 2011-12-23 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70096246764520 !ruby/object:Gem::Requirement
16
+ requirement: &70146560550740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70096246764520
24
+ version_requirements: *70146560550740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70096246764080 !ruby/object:Gem::Requirement
27
+ requirement: &70146560548780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70096246764080
35
+ version_requirements: *70146560548780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70096246763620 !ruby/object:Gem::Requirement
38
+ requirement: &70146560545380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70096246763620
46
+ version_requirements: *70146560545380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: genspec
49
- requirement: &70096246763180 !ruby/object:Gem::Requirement
49
+ requirement: &70146560538760 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70096246763180
57
+ version_requirements: *70146560538760
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sqlite3
60
- requirement: &70096246762740 !ruby/object:Gem::Requirement
60
+ requirement: &70146560536940 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70096246762740
68
+ version_requirements: *70146560536940
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &70096246762320 !ruby/object:Gem::Requirement
71
+ requirement: &70146560534160 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70096246762320
79
+ version_requirements: *70146560534160
80
80
  description: A DSL for Rails that provides easy table creation with sorting and filtering.
81
81
  email:
82
82
  - alasseigne@sei-mi.com
@@ -230,7 +230,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  segments:
232
232
  - 0
233
- hash: -4309695575052773710
233
+ hash: -4029356526350698911
234
234
  required_rubygems_version: !ruby/object:Gem::Requirement
235
235
  none: false
236
236
  requirements:
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  version: '0'
240
240
  segments:
241
241
  - 0
242
- hash: -4309695575052773710
242
+ hash: -4029356526350698911
243
243
  requirements: []
244
244
  rubyforge_project: tableficate
245
245
  rubygems_version: 1.8.6