ffaker 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -75,9 +75,14 @@ Try it in your own machine, your mileage may vary!
75
75
  * Rafael Souza ( http://github.com/rafaelss/ffaker ).
76
76
  * Robert Berry ( https://github.com/bdigital ).
77
77
  * qichunren ( http://github.com/qichunren ).
78
+ * Kristján Pétursson ( https://github.com/kristjan )
78
79
 
79
80
  == Changelog
80
81
 
82
+ * 1.3.0
83
+
84
+ Faker::Lorem.word as a convenience method, instead of Faker::Lorem.words(1).first.
85
+
81
86
  * 1.2.0
82
87
 
83
88
  New Faker::NameCN module (contributions by qichunren)
data/Rakefile CHANGED
@@ -43,13 +43,9 @@ end
43
43
  #
44
44
  #############################################################################
45
45
 
46
- require 'rspec/core/rake_task'
47
-
48
- require 'rake/testtask'
49
- Rake::TestTask.new(:test) do |test|
50
- test.libs << 'lib' << 'test'
51
- test.pattern = 'test/**/test_*.rb'
52
- test.verbose = true
46
+ desc "run the tests"
47
+ task :test do
48
+ sh "ruby -Ilib -Itest/ test/test*"
53
49
  end
54
50
 
55
51
  task :default => :test
@@ -59,7 +55,6 @@ task :console do
59
55
  sh "irb -I ./lib/ -rubygems -r ./lib/#{name}.rb"
60
56
  end
61
57
 
62
-
63
58
  #############################################################################
64
59
  #
65
60
  # Custom tasks (add your own tasks here)
@@ -75,31 +70,6 @@ rescue LoadError
75
70
  end
76
71
  end
77
72
 
78
- if File.directory?("features")
79
- begin
80
- require 'cucumber'
81
- require 'cucumber/rake/task'
82
-
83
- namespace :features do
84
- Cucumber::Rake::Task.new(:all) do |t|
85
- t.cucumber_opts = "--format pretty"
86
- end
87
-
88
- %w|tag|.each do |tag|
89
- Cucumber::Rake::Task.new("#{tag}") do |t|
90
- t.cucumber_opts = "--format pretty --tags @#{tag}"
91
- end
92
- end
93
- end
94
-
95
- rescue LoadError
96
- desc 'Cucumber rake task not available'
97
- task :features do
98
- abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
99
- end
100
- end
101
- end
102
-
103
73
  #############################################################################
104
74
  #
105
75
  # Packaging tasks
@@ -114,7 +84,7 @@ task :release => :build do
114
84
  sh "git commit --allow-empty -a -m 'Release #{version}'"
115
85
  sh "git tag v#{version}"
116
86
  sh "git push origin master"
117
- sh "git push origin v#{version}"
87
+ sh "git push --tags"
118
88
  sh "gem push pkg/#{name}-#{version}.gem"
119
89
  end
120
90
 
data/ffaker.gemspec CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.rubygems_version = '1.3.5'
6
6
 
7
7
  s.name = 'ffaker'
8
- s.version = '1.2.0'
9
- s.date = '2011-01-18'
8
+ s.version = '1.3.0'
9
+ s.date = '2011-02-27'
10
10
  s.rubyforge_project = 'ffaker'
11
11
 
12
12
  s.summary = "Faster Faker, generates dummy data."
data/lib/ffaker.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Faker
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
 
4
4
  require 'ffaker/utils/module_utils'
5
5
 
data/lib/ffaker/lorem.rb CHANGED
@@ -4,6 +4,10 @@ module Faker
4
4
  extend ModuleUtils
5
5
  extend self
6
6
 
7
+ def word
8
+ WORDS.rand
9
+ end
10
+
7
11
  def words(num = 3)
8
12
  WORDS.random_pick(num)
9
13
  end
data/test/test_lorem.rb CHANGED
@@ -21,4 +21,8 @@ class TestLorem < Test::Unit::TestCase
21
21
  def test_words
22
22
  assert_match /[ a-z]+/, Faker::Lorem.words.join(" ")
23
23
  end
24
+
25
+ def test_word
26
+ assert_match /[a-z]+/, Faker::Lorem.word
27
+ end
24
28
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffaker
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
- - 2
7
+ - 3
9
8
  - 0
10
- version: 1.2.0
9
+ version: 1.3.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Emmanuel Oga
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-01-18 00:00:00 -03:00
17
+ date: 2011-02-27 00:00:00 -03:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -74,7 +73,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
73
  requirements:
75
74
  - - ">="
76
75
  - !ruby/object:Gem::Version
77
- hash: 3
78
76
  segments:
79
77
  - 0
80
78
  version: "0"
@@ -83,7 +81,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
81
  requirements:
84
82
  - - ">="
85
83
  - !ruby/object:Gem::Version
86
- hash: 3
87
84
  segments:
88
85
  - 0
89
86
  version: "0"