random_string 0.0.2 → 0.1.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/.rspec CHANGED
@@ -1,4 +1,3 @@
1
1
  --color
2
- --debug
3
2
  -f documentation
4
3
  -p
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - "1.8.7"
3
4
  - "1.9.2"
4
5
  - "1.9.3"
5
6
  # uncomment this line if your project needs to run something other than `rake`:
data/Rakefile CHANGED
@@ -1,9 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "random_string/version.rb"
3
+ require 'rspec/core/rake_task'
3
4
 
4
5
  task :install_mah_gem do
5
6
  exec %{
6
7
  gem uninstall random_string;
7
8
  gem build random_string.gemspec;
8
9
  gem install random_string-#{RandomString::VERSION}.gem; }
9
- end
10
+ end
11
+
12
+ task :default => :spec
13
+ RSpec::Core::RakeTask.new
@@ -6,7 +6,7 @@ module RandomString
6
6
 
7
7
  def generate(pattern)
8
8
  matched_strings = []
9
- unmatched_strings = []
9
+ unmatched_strings = []
10
10
  sample_strings.each do |sample_string|
11
11
  break if matched_strings.size == ResultCount && unmatched_strings.size == ResultCount
12
12
 
@@ -18,8 +18,8 @@ module RandomString
18
18
  end
19
19
 
20
20
  {
21
- matched_strings: matched_strings,
22
- unmatched_strings: unmatched_strings
21
+ :matched_strings => matched_strings,
22
+ :unmatched_strings => unmatched_strings
23
23
  }
24
24
  end
25
25
 
@@ -45,7 +45,7 @@ module RandomString
45
45
  end
46
46
 
47
47
  def floats_data
48
- (0...1).step(0.01).to_a.map.each {|f| f.round(2).to_s}
48
+ (0...1).step(0.01).to_a.map { |f| f.to_s }
49
49
  end
50
50
 
51
51
  def stored_strings
@@ -1,3 +1,3 @@
1
1
  module RandomString
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "debugger", "~> 1.3"
21
+ spec.add_development_dependency "rake"
22
22
  spec.add_development_dependency "rspec"
23
23
  end
@@ -17,8 +17,8 @@ describe "RandomString::Main" do
17
17
  }
18
18
  let(:expected) do
19
19
  {
20
- matched_strings: strings,
21
- unmatched_strings: []
20
+ :matched_strings => strings,
21
+ :unmatched_strings => []
22
22
  }
23
23
  end
24
24
 
@@ -36,8 +36,8 @@ describe "RandomString::Main" do
36
36
  }
37
37
  let(:expected) do
38
38
  {
39
- matched_strings: [],
40
- unmatched_strings: strings
39
+ :matched_strings => [],
40
+ :unmatched_strings => strings
41
41
  }
42
42
  end
43
43
 
@@ -55,8 +55,8 @@ describe "RandomString::Main" do
55
55
  }
56
56
  let(:expected) do
57
57
  {
58
- matched_strings: ['nqtien310@gmail.com'],
59
- unmatched_strings: ['nqtien310']
58
+ :matched_strings => ['nqtien310@gmail.com'],
59
+ :unmatched_strings => ['nqtien310']
60
60
  }
61
61
  end
62
62
 
@@ -82,8 +82,8 @@ describe "RandomString::Main" do
82
82
  }
83
83
  let(:expected) do
84
84
  {
85
- matched_strings: ['nqtien310@gmail.com', 'nqtien310@skype.com', 'nqtien310@hotmail.com'],
86
- unmatched_strings: ['nqtien310', 'nqtien3101', 'nqtien3102'],
85
+ :matched_strings => ['nqtien310@gmail.com', 'nqtien310@skype.com', 'nqtien310@hotmail.com'],
86
+ :unmatched_strings => ['nqtien310', 'nqtien3101', 'nqtien3102'],
87
87
  }
88
88
  end
89
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-01 00:00:00.000000000 Z
12
+ date: 2013-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: debugger
15
+ name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '1.3'
21
+ version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ~>
27
+ - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: '1.3'
29
+ version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -81,12 +81,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
81
  - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
+ segments:
85
+ - 0
86
+ hash: -2399063124085287276
84
87
  required_rubygems_version: !ruby/object:Gem::Requirement
85
88
  none: false
86
89
  requirements:
87
90
  - - ! '>='
88
91
  - !ruby/object:Gem::Version
89
92
  version: '0'
93
+ segments:
94
+ - 0
95
+ hash: -2399063124085287276
90
96
  requirements: []
91
97
  rubyforge_project:
92
98
  rubygems_version: 1.8.25