protokoll 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -186,6 +186,16 @@ class ProtokollTest < ActiveSupport::TestCase
186
186
  assert_equal "2011150001PROTO", protocol1.number
187
187
  end
188
188
 
189
+ test "using 2 models" do
190
+ Protocol.protokoll.pattern = "%Y##"
191
+ Call.protokoll.pattern = "%Y##"
192
+
193
+ protocol = Protocol.create
194
+ call = Call.create
195
+ assert_equal "201101", protocol.number
196
+ assert_equal "201101", call.number
197
+ end
198
+
189
199
  ## Can't reproduce this on test environmet!
190
200
  ## if you know how to do that, contact-me!
191
201
  # test "Start application with populated db." do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protokoll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70167893317420 !ruby/object:Gem::Requirement
16
+ requirement: &70131532907580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70167893317420
24
+ version_requirements: *70131532907580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &70167893347460 !ruby/object:Gem::Requirement
27
+ requirement: &70131532937600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70167893347460
35
+ version_requirements: *70131532937600
36
36
  description: Rails 3 gem to enable creation of a custom autoincrement Time based string
37
37
  on a model defined by a pattern.
38
38
  email:
@@ -42,6 +42,7 @@ extensions: []
42
42
  extra_rdoc_files: []
43
43
  files:
44
44
  - lib/protokoll/auto_increment.rb
45
+ - lib/protokoll/class_variable.rb
45
46
  - lib/protokoll/extract_number.rb
46
47
  - lib/protokoll/version.rb
47
48
  - lib/protokoll.rb
@@ -53,6 +54,7 @@ files:
53
54
  - test/dummy/app/assets/stylesheets/application.css
54
55
  - test/dummy/app/controllers/application_controller.rb
55
56
  - test/dummy/app/helpers/application_helper.rb
57
+ - test/dummy/app/models/call.rb
56
58
  - test/dummy/app/models/principal.rb
57
59
  - test/dummy/app/models/protocol.rb
58
60
  - test/dummy/app/views/layouts/application.html.erb
@@ -75,6 +77,7 @@ files:
75
77
  - test/dummy/db/development.sqlite3
76
78
  - test/dummy/db/migrate/20110923024431_create_protocols.rb
77
79
  - test/dummy/db/migrate/20110923101536_create_principals.rb
80
+ - test/dummy/db/migrate/20110928013630_create_calls.rb
78
81
  - test/dummy/db/schema.rb
79
82
  - test/dummy/db/seeds.rb
80
83
  - test/dummy/db/test.sqlite3
@@ -86,10 +89,6 @@ files:
86
89
  - test/dummy/public/favicon.ico
87
90
  - test/dummy/Rakefile
88
91
  - test/dummy/script/rails
89
- - test/dummy/test/fixtures/principals.yml
90
- - test/dummy/test/fixtures/protocols.yml
91
- - test/dummy/test/unit/principal_test.rb
92
- - test/dummy/test/unit/protocol_test.rb
93
92
  - test/protokoll_test.rb
94
93
  - test/test_helper.rb
95
94
  homepage: https://github.com/celsodantas/protokoll
@@ -122,6 +121,7 @@ test_files:
122
121
  - test/dummy/app/assets/stylesheets/application.css
123
122
  - test/dummy/app/controllers/application_controller.rb
124
123
  - test/dummy/app/helpers/application_helper.rb
124
+ - test/dummy/app/models/call.rb
125
125
  - test/dummy/app/models/principal.rb
126
126
  - test/dummy/app/models/protocol.rb
127
127
  - test/dummy/app/views/layouts/application.html.erb
@@ -144,6 +144,7 @@ test_files:
144
144
  - test/dummy/db/development.sqlite3
145
145
  - test/dummy/db/migrate/20110923024431_create_protocols.rb
146
146
  - test/dummy/db/migrate/20110923101536_create_principals.rb
147
+ - test/dummy/db/migrate/20110928013630_create_calls.rb
147
148
  - test/dummy/db/schema.rb
148
149
  - test/dummy/db/seeds.rb
149
150
  - test/dummy/db/test.sqlite3
@@ -155,9 +156,5 @@ test_files:
155
156
  - test/dummy/public/favicon.ico
156
157
  - test/dummy/Rakefile
157
158
  - test/dummy/script/rails
158
- - test/dummy/test/fixtures/principals.yml
159
- - test/dummy/test/fixtures/protocols.yml
160
- - test/dummy/test/unit/principal_test.rb
161
- - test/dummy/test/unit/protocol_test.rb
162
159
  - test/protokoll_test.rb
163
160
  - test/test_helper.rb
@@ -1,7 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
-
3
- one:
4
- number_format: MyString
5
-
6
- two:
7
- number_format: MyString
@@ -1,7 +0,0 @@
1
- # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
-
3
- one:
4
- number: MyString
5
-
6
- two:
7
- number: MyString
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class PrincipalTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ProtocolTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
7
- end