random_text 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,9 @@
1
+ v0.0.5 2008-11-03 Moved to echoe
2
+
3
+ v0.0.4 2008-11-03 Moved to newgem
4
+
5
+ v0.0.3 2008-11-03 Refactored
6
+
7
+ v0.0.2 2008-11-03 Added words and unique words; setting $KCODE
8
+
9
+ v0.0.1 2008-11-03 Initial release
@@ -1,10 +1,9 @@
1
- History.txt
2
- Manifest.txt
3
- README.rdoc
4
- Rakefile
5
- lib/random_text.rb
1
+ CHANGELOG
6
2
  lib/random_text/random_strings.rb
7
3
  lib/random_text/random_text.rb
4
+ lib/random_text.rb
5
+ Rakefile
6
+ README.rdoc
8
7
  resources/lorem.txt
9
8
  resources/vesna.txt
10
9
  script/console
@@ -16,3 +15,4 @@ spec/random_text_spec.rb
16
15
  spec/spec.opts
17
16
  spec/spec_helper.rb
18
17
  tasks/rspec.rake
18
+ Manifest
data/Rakefile CHANGED
@@ -1,22 +1,13 @@
1
- %w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/clean'
4
+ require 'fileutils'
5
+ require 'echoe'
6
+
2
7
  require File.dirname(__FILE__) + '/lib/random_text'
3
8
 
4
- $hoe = Hoe.new('random_text', RandomText::VERSION) do |p|
5
- p.developer('toy', 'email')
6
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
7
- p.rubyforge_name = 'random-text'
8
- p.extra_deps = [
9
- ['activesupport','>= 2.0.2'],
10
- ]
11
- p.extra_dev_deps = [
12
- ['newgem', ">= #{::Newgem::VERSION}"]
13
- ]
14
-
15
- p.clean_globs |= %w[**/.DS_Store tmp *.log]
16
- path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
17
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
18
- p.rsync_args = '-av --delete --ignore-errors'
9
+ Echoe.new('random_text', RandomText::VERSION) do |p|
10
+ p.author = "toy"
11
+ p.summary = "A library to generate random strings."
12
+ p.runtime_dependencies = ['activesupport >= 2.0.2']
19
13
  end
20
-
21
- require 'newgem/tasks'
22
-
@@ -1,7 +1,7 @@
1
1
  module RandomText
2
2
  class RandomText
3
3
  def initialize(text)
4
- @words = RandomStrings.new(text.scan(/\w{3,}/).collect{ |w| w.chars.downcase.to_s }.reject{ |w| w =~ /^[0-9]/ }.uniq.map(&:chars))
4
+ @words = RandomStrings.new(text.scan(/\w{3,}/).collect{ |w| w.mb_chars.downcase.to_s }.reject{ |w| w =~ /^[0-9]/ }.uniq.map(&:mb_chars))
5
5
  @sentences = RandomStrings.new(text.split(/[\r\n]+/).uniq)
6
6
  end
7
7
 
data/lib/random_text.rb CHANGED
@@ -10,7 +10,7 @@ require 'random_text/random_text'
10
10
  require 'random_text/random_strings'
11
11
 
12
12
  module RandomText
13
- VERSION = '0.0.3'
13
+ VERSION = '0.0.5'
14
14
 
15
15
  def self.add_dictionary(path)
16
16
  const_name = File.basename(path, File.extname(path)).classify
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{random_text}
5
+ s.version = "0.0.5"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["toy"]
9
+ s.date = %q{2009-03-24}
10
+ s.description = %q{A library to generate random strings.}
11
+ s.email = %q{}
12
+ s.extra_rdoc_files = ["CHANGELOG", "lib/random_text/random_strings.rb", "lib/random_text/random_text.rb", "lib/random_text.rb", "README.rdoc", "tasks/rspec.rake"]
13
+ s.files = ["CHANGELOG", "lib/random_text/random_strings.rb", "lib/random_text/random_text.rb", "lib/random_text.rb", "Rakefile", "README.rdoc", "resources/lorem.txt", "resources/vesna.txt", "script/console", "script/destroy", "script/generate", "spec/random_text/random_string_spec.rb", "spec/random_text/random_text_spec.rb", "spec/random_text_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake", "Manifest", "random_text.gemspec"]
14
+ s.has_rdoc = true
15
+ s.homepage = %q{}
16
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Random_text", "--main", "README.rdoc"]
17
+ s.require_paths = ["lib"]
18
+ s.rubyforge_project = %q{random_text}
19
+ s.rubygems_version = %q{1.3.1}
20
+ s.summary = %q{A library to generate random strings.}
21
+
22
+ if s.respond_to? :specification_version then
23
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
24
+ s.specification_version = 2
25
+
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ s.add_runtime_dependency(%q<activesupport>, [">= 0", "= 2.0.2"])
28
+ else
29
+ s.add_dependency(%q<activesupport>, [">= 0", "= 2.0.2"])
30
+ end
31
+ else
32
+ s.add_dependency(%q<activesupport>, [">= 0", "= 2.0.2"])
33
+ end
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: random_text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - toy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-03 00:00:00 +03:00
12
+ date: 2009-03-24 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,49 +20,31 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.0.2
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: newgem
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.0.3
34
- version:
35
- - !ruby/object:Gem::Dependency
36
- name: hoe
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
23
+ version: "0"
24
+ - - "="
42
25
  - !ruby/object:Gem::Version
43
- version: 1.8.0
26
+ version: 2.0.2
44
27
  version:
45
- description: Class to make usage of http://vesna.yandex.ru/ and http://lipsum.com/ easier
46
- email:
47
- - email
28
+ description: A library to generate random strings.
29
+ email: ""
48
30
  executables: []
49
31
 
50
32
  extensions: []
51
33
 
52
34
  extra_rdoc_files:
53
- - History.txt
54
- - Manifest.txt
35
+ - CHANGELOG
36
+ - lib/random_text/random_strings.rb
37
+ - lib/random_text/random_text.rb
38
+ - lib/random_text.rb
55
39
  - README.rdoc
56
- - resources/lorem.txt
57
- - resources/vesna.txt
40
+ - tasks/rspec.rake
58
41
  files:
59
- - History.txt
60
- - Manifest.txt
61
- - README.rdoc
62
- - Rakefile
63
- - lib/random_text.rb
42
+ - CHANGELOG
64
43
  - lib/random_text/random_strings.rb
65
44
  - lib/random_text/random_text.rb
45
+ - lib/random_text.rb
46
+ - Rakefile
47
+ - README.rdoc
66
48
  - resources/lorem.txt
67
49
  - resources/vesna.txt
68
50
  - script/console
@@ -74,10 +56,16 @@ files:
74
56
  - spec/spec.opts
75
57
  - spec/spec_helper.rb
76
58
  - tasks/rspec.rake
59
+ - Manifest
60
+ - random_text.gemspec
77
61
  has_rdoc: true
78
- homepage: http://github.com/toy/random_text/tree/master
62
+ homepage: ""
79
63
  post_install_message:
80
64
  rdoc_options:
65
+ - --line-numbers
66
+ - --inline-source
67
+ - --title
68
+ - Random_text
81
69
  - --main
82
70
  - README.rdoc
83
71
  require_paths:
@@ -92,14 +80,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
80
  requirements:
93
81
  - - ">="
94
82
  - !ruby/object:Gem::Version
95
- version: "0"
83
+ version: "1.2"
96
84
  version:
97
85
  requirements: []
98
86
 
99
- rubyforge_project: random-text
100
- rubygems_version: 1.2.0
87
+ rubyforge_project: random_text
88
+ rubygems_version: 1.3.1
101
89
  signing_key:
102
90
  specification_version: 2
103
- summary: Class to make usage of http://vesna.yandex.ru/ and http://lipsum.com/ easier
91
+ summary: A library to generate random strings.
104
92
  test_files: []
105
93
 
data/History.txt DELETED
@@ -1,4 +0,0 @@
1
- == 0.0.1 2008-11-03
2
-
3
- * 1 major enhancement:
4
- * Initial release