russian_phone 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -1,47 +1,40 @@
1
- # coding: utf-8
2
-
3
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
- $LOAD_PATH.unshift(File.dirname(__FILE__))
5
- require 'rspec'
6
- require 'simplecov'
7
- require 'mongoid'
8
-
9
- require 'database_cleaner'
10
-
11
- SimpleCov.start
12
-
13
- require 'russian_phone'
14
-
15
- # Requires supporting files with custom matchers and macros, etc,
16
- # in ./support/ and its subdirectories.
17
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
18
-
19
- def mongoid3?
20
- defined?(Mongoid::VERSION) && Gem::Version.new(Mongoid::VERSION) >= Gem::Version.new('3.0.0')
21
- end
22
-
23
- Mongoid.configure do |config|
24
- if mongoid3?
25
- config.sessions[:default] = { :database => 'russian_phone_test', :hosts => ['localhost:27017'] }
26
- else
27
- config.master = Mongo::Connection.new.db('russian_phone_test')
28
- end
29
- end
30
-
31
- DatabaseCleaner.orm = "mongoid"
32
-
33
- RSpec.configure do |config|
34
- config.before(:all) do
35
- DatabaseCleaner.strategy = :truncation
36
- end
37
-
38
- config.before(:each) do
39
- DatabaseCleaner.start
40
- end
41
-
42
- config.after(:each) do
43
- DatabaseCleaner.clean
44
- end
45
-
46
- config.mock_with :rspec
1
+ # coding: utf-8
2
+
3
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
5
+ require 'rspec'
6
+ require 'simplecov'
7
+ require 'mongoid'
8
+
9
+ require 'database_cleaner'
10
+
11
+ SimpleCov.start
12
+
13
+ require 'russian_phone'
14
+
15
+ # Requires supporting files with custom matchers and macros, etc,
16
+ # in ./support/ and its subdirectories.
17
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
18
+
19
+ Mongoid.configure do |config|
20
+ ENV["MONGOID_ENV"] = "test"
21
+ Mongoid.load!("spec/support/mongoid.yml")
22
+ end
23
+
24
+ DatabaseCleaner.orm = "mongoid"
25
+
26
+ RSpec.configure do |config|
27
+ config.before(:all) do
28
+ DatabaseCleaner.strategy = :truncation
29
+ end
30
+
31
+ config.before(:each) do
32
+ DatabaseCleaner.start
33
+ end
34
+
35
+ config.after(:each) do
36
+ DatabaseCleaner.clean
37
+ end
38
+
39
+ config.mock_with :rspec
47
40
  end
@@ -0,0 +1,8 @@
1
+ test:
2
+ sessions:
3
+ default:
4
+ database: russian_phone
5
+ hosts:
6
+ - localhost:27017
7
+ options:
8
+ consistency: :strong
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: russian_phone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
5
- prerelease:
4
+ version: 0.3.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - GlebTv
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
11
+ date: 2013-06-14 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mongoid
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.0.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.0.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,39 +41,34 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 1.1.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 1.1.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: simplecov
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 0.4.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 0.4.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: database_cleaner
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -99,7 +88,8 @@ extensions: []
99
88
  extra_rdoc_files: []
100
89
  files:
101
90
  - .gitignore
102
- - .rvmrc
91
+ - .ruby-gemset
92
+ - .ruby-version
103
93
  - Gemfile
104
94
  - LICENSE.txt
105
95
  - README.md
@@ -114,6 +104,7 @@ files:
114
104
  - russian_phone.gemspec
115
105
  - spec/phone_spec.rb
116
106
  - spec/spec_helper.rb
107
+ - spec/support/mongoid.yml
117
108
  - spec/support/user.rb
118
109
  - spec/support/user_with_any_code.rb
119
110
  - spec/support/user_with_required.rb
@@ -122,31 +113,31 @@ files:
122
113
  - validate.sh
123
114
  homepage: https://github.com/glebtv/russian_phone
124
115
  licenses: []
116
+ metadata: {}
125
117
  post_install_message:
126
118
  rdoc_options: []
127
119
  require_paths:
128
120
  - lib
129
121
  required_ruby_version: !ruby/object:Gem::Requirement
130
- none: false
131
122
  requirements:
132
- - - ! '>='
123
+ - - '>='
133
124
  - !ruby/object:Gem::Version
134
125
  version: '0'
135
126
  required_rubygems_version: !ruby/object:Gem::Requirement
136
- none: false
137
127
  requirements:
138
- - - ! '>='
128
+ - - '>='
139
129
  - !ruby/object:Gem::Version
140
130
  version: '0'
141
131
  requirements: []
142
132
  rubyforge_project:
143
- rubygems_version: 1.8.24
133
+ rubygems_version: 2.0.3
144
134
  signing_key:
145
- specification_version: 3
135
+ specification_version: 4
146
136
  summary: Поле для хранения Российских телефонных номеров в Mongoid
147
137
  test_files:
148
138
  - spec/phone_spec.rb
149
139
  - spec/spec_helper.rb
140
+ - spec/support/mongoid.yml
150
141
  - spec/support/user.rb
151
142
  - spec/support/user_with_any_code.rb
152
143
  - spec/support/user_with_required.rb
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.3-p374@russianphone --create