I18nFloat 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,7 +4,7 @@ I18nFloat
4
4
  Description
5
5
  -----------
6
6
 
7
- [Ruby](http://www.ruby-lang.org) gem to use with [Rails](http://www.rubyonrails.org). I18nFloat allows your users to use format number like "1 200,84" in forms. ActiveModel Float attributes don't care anymore if you like commas or dots!
7
+ [Ruby](http://www.ruby-lang.org) gem to use with [Rails](http://www.rubyonrails.org). I18nFloat allows your users to use format number like "1 200,84" in forms. ActiveRecord Float attributes don't care anymore if you like commas or dots!
8
8
 
9
9
  Features:
10
10
 
@@ -1,3 +1,3 @@
1
1
  module I18nFloat
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,19 +1,5 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class I18nFloatTest < ActiveSupport::TestCase
4
- test "1200" do
5
- assert_equal 1200.00, Marathon.new(:duration => "1200").duration
6
- end
7
-
8
- test "1200.00" do
9
- assert_equal 1200.00, Marathon.new(:duration => "1200.00").duration
10
- end
11
-
12
- test "1200,00" do
13
- assert_equal 1200.00, Marathon.new(:duration => "1200,00").duration
14
- end
15
-
16
- test "1 200,00" do
17
- assert_equal 1200.00, Marathon.new(:duration => "1 200,00").duration
18
- end
4
+
19
5
  end
@@ -1,7 +1,19 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class MarathonTest < ActiveSupport::TestCase
4
- # test "the truth" do
5
- # assert true
6
- # end
4
+ test "1200" do
5
+ assert_equal 1200.00, Marathon.new(:duration => "1200").duration
6
+ end
7
+
8
+ test "1200.00" do
9
+ assert_equal 1200.00, Marathon.new(:duration => "1200.00").duration
10
+ end
11
+
12
+ test "1200,00" do
13
+ assert_equal 1200.00, Marathon.new(:duration => "1200,00").duration
14
+ end
15
+
16
+ test "1 200,00" do
17
+ assert_equal 1200.00, Marathon.new(:duration => "1 200,00").duration
18
+ end
7
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: I18nFloat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.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-09-15 00:00:00.000000000Z
12
+ date: 2011-09-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2152807940 !ruby/object:Gem::Requirement
16
+ requirement: &2152144840 !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: *2152807940
24
+ version_requirements: *2152144840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sqlite3
27
- requirement: &2152807400 !ruby/object:Gem::Requirement
27
+ requirement: &2152143800 !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: *2152807400
35
+ version_requirements: *2152143800
36
36
  description: ! "Allow french like format for ActiveModel Float / Decimal attributes.\n\n
37
37
  \ User inputs like \"1 200,54\" will be nicely saved as 1200.54 in your database.\n\n
38
38
  \ Standard format is still usable."
@@ -48,8 +48,6 @@ files:
48
48
  - MIT-LICENSE
49
49
  - Rakefile
50
50
  - README.md
51
- - test/I18nFloat_test.rb
52
- - test/dummy/Rakefile
53
51
  - test/dummy/app/assets/javascripts/application.js
54
52
  - test/dummy/app/assets/stylesheets/application.css
55
53
  - test/dummy/app/controllers/application_controller.rb
@@ -76,15 +74,16 @@ files:
76
74
  - test/dummy/db/migrate/20110915220323_create_marathons.rb
77
75
  - test/dummy/db/schema.rb
78
76
  - test/dummy/db/test.sqlite3
79
- - test/dummy/log/development.log
80
77
  - test/dummy/log/test.log
81
78
  - test/dummy/public/404.html
82
79
  - test/dummy/public/422.html
83
80
  - test/dummy/public/500.html
84
81
  - test/dummy/public/favicon.ico
82
+ - test/dummy/Rakefile
85
83
  - test/dummy/script/rails
86
84
  - test/dummy/test/fixtures/marathons.yml
87
85
  - test/dummy/test/unit/marathon_test.rb
86
+ - test/I18nFloat_test.rb
88
87
  - test/test_helper.rb
89
88
  homepage: https://bitbucket.org/Bounga/i18nfloat
90
89
  licenses: []
@@ -98,21 +97,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
97
  - - ! '>='
99
98
  - !ruby/object:Gem::Version
100
99
  version: '0'
100
+ segments:
101
+ - 0
102
+ hash: 731414261953546997
101
103
  required_rubygems_version: !ruby/object:Gem::Requirement
102
104
  none: false
103
105
  requirements:
104
106
  - - ! '>='
105
107
  - !ruby/object:Gem::Version
106
108
  version: '0'
109
+ segments:
110
+ - 0
111
+ hash: 731414261953546997
107
112
  requirements: []
108
113
  rubyforge_project:
109
- rubygems_version: 1.8.10
114
+ rubygems_version: 1.8.6
110
115
  signing_key:
111
116
  specification_version: 3
112
117
  summary: Allow french float format in ActiveModel attributes
113
118
  test_files:
114
- - test/I18nFloat_test.rb
115
- - test/dummy/Rakefile
116
119
  - test/dummy/app/assets/javascripts/application.js
117
120
  - test/dummy/app/assets/stylesheets/application.css
118
121
  - test/dummy/app/controllers/application_controller.rb
@@ -139,13 +142,14 @@ test_files:
139
142
  - test/dummy/db/migrate/20110915220323_create_marathons.rb
140
143
  - test/dummy/db/schema.rb
141
144
  - test/dummy/db/test.sqlite3
142
- - test/dummy/log/development.log
143
145
  - test/dummy/log/test.log
144
146
  - test/dummy/public/404.html
145
147
  - test/dummy/public/422.html
146
148
  - test/dummy/public/500.html
147
149
  - test/dummy/public/favicon.ico
150
+ - test/dummy/Rakefile
148
151
  - test/dummy/script/rails
149
152
  - test/dummy/test/fixtures/marathons.yml
150
153
  - test/dummy/test/unit/marathon_test.rb
154
+ - test/I18nFloat_test.rb
151
155
  - test/test_helper.rb
@@ -1,83 +0,0 @@
1
-  (0.1ms) select sqlite_version(*)
2
-  (12.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
-  (0.1ms) PRAGMA index_list("schema_migrations")
4
-  (2.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
- Migrating to CreateMarathons (20110915220323)
7
-  (0.6ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime)
8
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110915220323')
9
-  (0.3ms) select sqlite_version(*)
10
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
11
-  (0.0ms) PRAGMA index_list("marathons")
12
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
13
-  (0.2ms) select sqlite_version(*)
14
-  (12.8ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
15
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
16
-  (0.1ms) PRAGMA index_list("schema_migrations")
17
-  (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
18
-  (0.1ms) SELECT version FROM "schema_migrations"
19
-  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
20
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
21
-  (0.2ms) select sqlite_version(*)
22
-  (12.5ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
23
-  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
24
-  (0.0ms) PRAGMA index_list("schema_migrations")
25
-  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
26
-  (0.1ms) SELECT version FROM "schema_migrations"
27
-  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
28
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
29
-  (0.2ms) select sqlite_version(*)
30
-  (12.7ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
31
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
32
-  (0.1ms) PRAGMA index_list("schema_migrations")
33
-  (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
34
-  (0.1ms) SELECT version FROM "schema_migrations"
35
-  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
36
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
37
-  (0.2ms) select sqlite_version(*)
38
-  (12.6ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
39
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
40
-  (0.1ms) PRAGMA index_list("schema_migrations")
41
-  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
42
-  (0.1ms) SELECT version FROM "schema_migrations"
43
-  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
44
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
45
-  (0.2ms) select sqlite_version(*)
46
-  (12.8ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
47
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
48
-  (0.1ms) PRAGMA index_list("schema_migrations")
49
-  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
50
-  (0.1ms) SELECT version FROM "schema_migrations"
51
-  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
52
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
53
-  (0.2ms) select sqlite_version(*)
54
-  (12.5ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
55
-  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
56
-  (0.0ms) PRAGMA index_list("schema_migrations")
57
-  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
58
-  (0.1ms) SELECT version FROM "schema_migrations"
59
-  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
60
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
61
-  (0.2ms) select sqlite_version(*)
62
-  (1.9ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
63
-  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
64
-  (0.0ms) PRAGMA index_list("schema_migrations")
65
-  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
66
-  (0.1ms) SELECT version FROM "schema_migrations"
67
-  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
68
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
69
-  (0.2ms) select sqlite_version(*)
70
-  (12.6ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
71
-  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
72
-  (0.1ms) PRAGMA index_list("schema_migrations")
73
-  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
74
-  (0.1ms) SELECT version FROM "schema_migrations"
75
-  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')
76
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
77
-  (0.2ms) select sqlite_version(*)
78
-  (12.8ms) CREATE TABLE "marathons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "duration" float, "created_at" datetime, "updated_at" datetime) 
79
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
80
-  (0.0ms) PRAGMA index_list("schema_migrations")
81
-  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
82
-  (0.1ms) SELECT version FROM "schema_migrations"
83
-  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110915220323')