bramgem 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90e721273cfcbfa3bd12dd20c240dd585f14f654
4
- data.tar.gz: b535390cda94b38cdddaeac2efbfc4220255aae4
3
+ metadata.gz: 5a9e8d17cf48c66df2f15fa4d99795211842520e
4
+ data.tar.gz: 50e46a2cea84376e328785be60ec5d66f13f0916
5
5
  SHA512:
6
- metadata.gz: 378971778ef50e9d971c743ac091a858c7296947ee179ac261828316c1a31ab9421e4065cfb5af6cc799e3fadc2d5bebff759e6277d11b3615c6e160502a0505
7
- data.tar.gz: 018ad91f41838f9398a8bbbc7f1867fcd882bc802c979cffc7662a1f3576d0e92b42a19081b1b62f84b654aa4de64cc8b6525b0553d15e9d72e503ad11fcb8cb
6
+ metadata.gz: 887e00600cff3cb75051e76609a52c8ec9b508b43637deb01ff0a1a70b0697afcdc30addf172a726d4fe2cf83caf41ce435fb5d8ea308adcedea5866fab67472
7
+ data.tar.gz: b485d466ab21a94b622b0c39837ff1b187bbb297f45623699065528747a0ce1729cea48f8f7b7ee5f9a0a4b74e61ba84869ab6e65b53762a9e061776a601a6a0
@@ -0,0 +1,17 @@
1
+ module Bramgem
2
+ class Base
3
+ def self.source
4
+ @source ||= self.read
5
+ end
6
+
7
+ def self.processed_source
8
+ @processed_source ||= self.source.split("\n").uniq
9
+ end
10
+
11
+ private
12
+
13
+ def self.read
14
+ File.read(File.expand_path('book/dracula.txt'))
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ module Bramgem
2
+ class Sentence < Base
3
+
4
+ def self.sentence
5
+ self.processed_source.sample
6
+ end
7
+
8
+ def self.sentences(n=5)
9
+ self.processed_source.sample(n)
10
+ end
11
+
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Bramgem
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,4 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+ require File.expand_path('../../lib/bramgem.rb', __FILE__)
4
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bramgem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adler
@@ -14,28 +14,28 @@ dependencies:
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: This gem serves to generates dummy texts
@@ -45,14 +45,13 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - .gitignore
49
48
  - Gemfile
50
- - LICENSE.txt
51
49
  - README.md
52
50
  - Rakefile
53
- - bramgem.gemspec
54
- - lib/bramgem.rb
51
+ - lib/bramgem/base.rb
52
+ - lib/bramgem/sentence.rb
55
53
  - lib/bramgem/version.rb
54
+ - test/test_helper.rb
56
55
  homepage: ''
57
56
  licenses:
58
57
  - MIT
@@ -63,18 +62,19 @@ require_paths:
63
62
  - lib
64
63
  required_ruby_version: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - '>='
65
+ - - ">="
67
66
  - !ruby/object:Gem::Version
68
67
  version: '0'
69
68
  required_rubygems_version: !ruby/object:Gem::Requirement
70
69
  requirements:
71
- - - '>='
70
+ - - ">="
72
71
  - !ruby/object:Gem::Version
73
72
  version: '0'
74
73
  requirements: []
75
74
  rubyforge_project:
76
- rubygems_version: 2.0.14
75
+ rubygems_version: 2.2.2
77
76
  signing_key:
78
77
  specification_version: 4
79
78
  summary: Generates dummy texts
80
- test_files: []
79
+ test_files:
80
+ - test/test_helper.rb
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Adler
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/bramgem.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'bramgem/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "bramgem"
8
- spec.version = Bramgem::VERSION
9
- spec.authors = ["Adler"]
10
- spec.email = ["nkj20932@hotmail.com"]
11
- spec.summary = %q{Generates dummy texts}
12
- spec.description = %q{This gem serves to generates dummy texts}
13
- spec.homepage = ""
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- end
data/lib/bramgem.rb DELETED
@@ -1,7 +0,0 @@
1
- require 'bramgem/version.rb'
2
- require 'bramgem/base.rb'
3
- require 'bramgem/sentence.rb'
4
-
5
- module Bramgem
6
- # Your code goes here...
7
- end