hellotxt 1.0.2 → 1.0.3
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/History.txt +7 -0
- data/Rakefile +4 -5
- data/bin/hellotxt +1 -2
- data/lib/hellotxt.rb +6 -46
- metadata +1 -2
- data/spec/hellotxt_spec.rb +0 -18
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -15,8 +15,7 @@ Bones {
|
|
15
15
|
authors ['Kevin Williams']
|
16
16
|
email ['kevwil@gmail.com']
|
17
17
|
url 'http://kevwil.github.com/hellotxt'
|
18
|
-
version ENV['VERSION'] || HelloTxt::VERSION
|
19
|
-
# rubyforge.name 'hellotxt'
|
18
|
+
version ENV['VERSION'] || HelloTxt::VERSION::STRING
|
20
19
|
readme_file 'README'
|
21
20
|
ignore_file '.gitignore'
|
22
21
|
gem.need_tar false
|
@@ -24,9 +23,9 @@ Bones {
|
|
24
23
|
depend_on 'rspec', :development => true
|
25
24
|
depend_on 'mocha', :development => true
|
26
25
|
ruby_opts << '-Ilib' << '-rubygems'
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
spec.opts << '--color'# << '--format html:./spec_out.html'
|
27
|
+
rcov.opts << ['--exclude', 'rcov']
|
28
|
+
rcov.opts << ['--exclude', 'mocha']
|
30
29
|
# enable_sudo
|
31
30
|
}
|
32
31
|
|
data/bin/hellotxt
CHANGED
data/lib/hellotxt.rb
CHANGED
@@ -1,52 +1,12 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
|
2
|
-
|
3
1
|
module HelloTxt
|
4
2
|
|
5
|
-
# :
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# Returns the version string for the library.
|
12
|
-
#
|
13
|
-
def self.version
|
14
|
-
VERSION
|
15
|
-
end
|
16
|
-
|
17
|
-
# Returns the library path for the module. If any arguments are given,
|
18
|
-
# they will be joined to the end of the libray path using
|
19
|
-
# <tt>File.join</tt>.
|
20
|
-
#
|
21
|
-
def self.libpath( *args )
|
22
|
-
args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
23
|
-
end
|
24
|
-
|
25
|
-
# Returns the lpath for the module. If any arguments are given,
|
26
|
-
# they will be joined to the end of the path using
|
27
|
-
# <tt>File.join</tt>.
|
28
|
-
#
|
29
|
-
def self.path( *args )
|
30
|
-
args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
3
|
+
module VERSION # :nodoc:
|
4
|
+
MAJOR = 1
|
5
|
+
MINOR = 0
|
6
|
+
TINY = 3
|
7
|
+
STRING = [MAJOR,MINOR,TINY].join('.')
|
31
8
|
end
|
32
|
-
|
33
|
-
# Utility method used to require all files ending in .rb that lie in the
|
34
|
-
# directory below this file that has the same name as the filename passed
|
35
|
-
# in. Optionally, a specific _directory_ name can be passed in such that
|
36
|
-
# the _filename_ does not have to be equivalent to the directory.
|
37
|
-
#
|
38
|
-
def self.require_all_libs_relative_to( fname, dir = nil )
|
39
|
-
dir ||= ::File.basename(fname, '.*')
|
40
|
-
search_me = ::File.expand_path(
|
41
|
-
::File.join(::File.dirname(fname), dir, '**', '*.rb'))
|
42
|
-
|
43
|
-
Dir.glob(search_me).sort.each {|rb| require rb}
|
44
|
-
end
|
45
|
-
|
46
|
-
end # module Hellotxt
|
47
|
-
|
48
|
-
#HelloTxt.require_all_libs_relative_to(__FILE__)
|
49
|
-
module HelloTxt
|
9
|
+
|
50
10
|
autoload :Keyloader, 'hellotxt/keyloader'
|
51
11
|
autoload :Client, 'hellotxt/client'
|
52
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellotxt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Williams
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- lib/hellotxt/client.rb
|
75
75
|
- lib/hellotxt/keyloader.rb
|
76
76
|
- spec/client_spec.rb
|
77
|
-
- spec/hellotxt_spec.rb
|
78
77
|
- spec/keyloader_spec.rb
|
79
78
|
- spec/spec_helper.rb
|
80
79
|
- spec/spec_responses.rb
|
data/spec/hellotxt_spec.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
3
|
-
|
4
|
-
describe HelloTxt, 'main module' do
|
5
|
-
it 'should return the version string' do
|
6
|
-
HelloTxt.version.should be_a_kind_of(String)
|
7
|
-
end
|
8
|
-
|
9
|
-
it 'should return the library path' do
|
10
|
-
HelloTxt.libpath.should eql(HelloTxt::LIBPATH)
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'should return the path to the library' do
|
14
|
-
HelloTxt.path.should eql(HelloTxt::PATH)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# EOF
|