gnip 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +192 -37
- data/gnip-ruby.gemspec +18 -21
- data/lib/gnip.rb +1 -1
- metadata +6 -8
- data/gemspec.rb +0 -25
- data/rakefile +0 -53
data/Rakefile
CHANGED
@@ -1,53 +1,208 @@
|
|
1
|
-
task 'default' => 'test:all'
|
2
1
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
This.author = "Ara T. Howard"
|
3
|
+
This.email = "ara.t.howard@gmail.com"
|
4
|
+
This.rubyforge_project = 'gnip'
|
5
|
+
This.homepage = 'http://github.com/gnip/gnip-ruby/tree/master'
|
6
|
+
|
7
|
+
|
8
|
+
task :default do
|
9
|
+
puts(Rake::Task.tasks.map{|task| task.name} - ['default'])
|
10
|
+
end
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
|
13
|
+
task :gemspec do
|
14
|
+
ignore_extensions = 'git', 'svn', 'tmp', /sw./, 'bak', 'gem'
|
15
|
+
ignore_directories = 'pkg'
|
16
|
+
|
17
|
+
shiteless =
|
18
|
+
lambda do |list|
|
19
|
+
list.delete_if do |entry|
|
20
|
+
next unless test(?e, entry)
|
21
|
+
extension = File.basename(entry).split(%r/[.]/).last
|
22
|
+
ignore_extensions.any?{|ext| ext === extension}
|
23
|
+
end
|
24
|
+
list.delete_if do |entry|
|
25
|
+
next unless test(?d, entry)
|
26
|
+
dirname = File.expand_path(entry)
|
27
|
+
ignore_directories.any?{|dir| File.expand_path(dir) == dirname}
|
14
28
|
end
|
15
29
|
end
|
16
30
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
31
|
+
lib = This.lib
|
32
|
+
version = This.version
|
33
|
+
files = shiteless[Dir::glob("**/**")]
|
34
|
+
executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
|
35
|
+
has_rdoc = true #File.exist?('doc')
|
36
|
+
test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
|
37
|
+
|
38
|
+
template =
|
39
|
+
if test(?e, 'gemspec.erb')
|
40
|
+
Template{ IO.read('gemspec.erb') }
|
41
|
+
else
|
42
|
+
Template {
|
43
|
+
<<-__
|
44
|
+
## #{ This.gemspec }
|
45
|
+
#
|
46
|
+
|
47
|
+
Gem::Specification::new do |spec|
|
48
|
+
spec.name = #{ lib.inspect }
|
49
|
+
spec.version = #{ version.inspect }
|
50
|
+
spec.platform = Gem::Platform::RUBY
|
51
|
+
spec.summary = #{ lib.inspect }
|
52
|
+
|
53
|
+
spec.files = #{ files.inspect }
|
54
|
+
spec.executables = #{ executables.inspect }
|
55
|
+
|
56
|
+
spec.require_path = "lib"
|
57
|
+
|
58
|
+
spec.has_rdoc = #{ has_rdoc.inspect }
|
59
|
+
spec.test_files = #{ test_files.inspect }
|
60
|
+
|
61
|
+
spec.rubyforge_project = #{ This.rubyforge_project.inspect }
|
62
|
+
spec.author = #{ This.author.inspect }
|
63
|
+
spec.email = #{ This.email.inspect }
|
64
|
+
spec.homepage = #{ This.homepage.inspect }
|
65
|
+
end
|
66
|
+
__
|
67
|
+
}
|
25
68
|
end
|
69
|
+
|
70
|
+
open(This.gemspec, "w"){|fd| fd.puts template}
|
26
71
|
end
|
27
72
|
|
28
|
-
task
|
73
|
+
task :gem => [:clean, :gemspec] do
|
74
|
+
Fu.mkdir_p This.pkgdir
|
75
|
+
before = Dir['*.gem']
|
76
|
+
cmd = "gem build #{ This.gemspec }"
|
77
|
+
`#{ cmd }`
|
78
|
+
after = Dir['*.gem']
|
79
|
+
gem = ((after - before).first || after.first) or abort('no gem!')
|
80
|
+
Fu.mv gem, This.pkgdir
|
81
|
+
This.gem = File.basename(gem)
|
29
82
|
end
|
30
83
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
84
|
+
task :readme do
|
85
|
+
samples = ''
|
86
|
+
prompt = '~ > '
|
87
|
+
lib = This.lib
|
88
|
+
version = This.version
|
89
|
+
|
90
|
+
Dir['sample*/*'].sort.each do |sample|
|
91
|
+
samples << "\n" << " <========< #{ sample } >========>" << "\n\n"
|
92
|
+
|
93
|
+
cmd = "cat #{ sample }"
|
94
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
95
|
+
samples << Util.indent(`#{ cmd }`, 4) << "\n"
|
96
|
+
|
97
|
+
cmd = "ruby #{ sample }"
|
98
|
+
samples << Util.indent(prompt + cmd, 2) << "\n\n"
|
99
|
+
|
100
|
+
cmd = "ruby -e'STDOUT.sync=true; exec %(ruby -Ilib #{ sample })'"
|
101
|
+
samples << Util.indent(`#{ cmd } 2>&1`, 4) << "\n"
|
40
102
|
end
|
103
|
+
|
104
|
+
template =
|
105
|
+
if test(?e, 'readme.erb')
|
106
|
+
Template{ IO.read('readme.erb') }
|
107
|
+
else
|
108
|
+
Template {
|
109
|
+
<<-__
|
110
|
+
NAME
|
111
|
+
#{ lib }
|
112
|
+
|
113
|
+
DESCRIPTION
|
114
|
+
|
115
|
+
INSTALL
|
116
|
+
gem install #{ lib }
|
117
|
+
|
118
|
+
SAMPLES
|
119
|
+
#{ samples }
|
120
|
+
__
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
open("README", "w"){|fd| fd.puts template}
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
task :clean do
|
129
|
+
Dir[File.join(This.pkgdir, '**/**')].each{|entry| Fu.rm_rf(entry)}
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
task :release => [:clean, :gemspec, :gem] do
|
134
|
+
gems = Dir[File.join(This.pkgdir, '*.gem')].flatten
|
135
|
+
raise "which one? : #{ gems.inspect }" if gems.size > 1
|
136
|
+
raise "no gems?" if gems.size < 1
|
137
|
+
cmd = "rubyforge login && rubyforge add_release #{ This.rubyforge_project } #{ This.lib } #{ This.version } #{ This.pkgdir }/#{ This.gem }"
|
138
|
+
puts cmd
|
139
|
+
system cmd
|
41
140
|
end
|
42
141
|
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
43
146
|
BEGIN {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
147
|
+
$VERBOSE = nil
|
148
|
+
|
149
|
+
require 'ostruct'
|
150
|
+
require 'erb'
|
151
|
+
require 'fileutils'
|
152
|
+
|
153
|
+
Fu = FileUtils
|
154
|
+
|
155
|
+
This = OpenStruct.new
|
156
|
+
|
157
|
+
This.file = File.expand_path(__FILE__)
|
158
|
+
This.dir = File.dirname(This.file)
|
159
|
+
This.pkgdir = File.join(This.dir, 'pkg')
|
160
|
+
|
161
|
+
This.lib = ENV['LIB']
|
162
|
+
This.lib ||= 'gnip'
|
163
|
+
|
164
|
+
version = ENV['VERSION']
|
165
|
+
unless version
|
166
|
+
name = This.lib.capitalize
|
167
|
+
require "./lib/#{ This.lib }"
|
168
|
+
version = eval(name).send(:version)
|
52
169
|
end
|
170
|
+
This.version = version
|
171
|
+
|
172
|
+
abort('no lib') unless This.lib
|
173
|
+
abort('no version') unless This.version
|
174
|
+
|
175
|
+
This.gemspec = "gnip-ruby.gemspec"
|
176
|
+
|
177
|
+
module Util
|
178
|
+
def indent(s, n = 2)
|
179
|
+
s = unindent(s)
|
180
|
+
ws = ' ' * n
|
181
|
+
s.gsub(%r/^/, ws)
|
182
|
+
end
|
183
|
+
|
184
|
+
def unindent(s)
|
185
|
+
indent = nil
|
186
|
+
s.each do |line|
|
187
|
+
next if line =~ %r/^\s*$/
|
188
|
+
indent = line[%r/^\s*/] and break
|
189
|
+
end
|
190
|
+
indent ? s.gsub(%r/^#{ indent }/, "") : s
|
191
|
+
end
|
192
|
+
extend self
|
193
|
+
end
|
194
|
+
|
195
|
+
class Template
|
196
|
+
def initialize(&block)
|
197
|
+
@block = block
|
198
|
+
@template = block.call.to_s
|
199
|
+
end
|
200
|
+
def expand(b=nil)
|
201
|
+
ERB.new(Util.unindent(@template)).result(b||@block)
|
202
|
+
end
|
203
|
+
alias_method 'to_s', 'expand'
|
204
|
+
end
|
205
|
+
def Template(*args, &block) Template.new(*args, &block) end
|
206
|
+
|
207
|
+
Dir.chdir(This.dir)
|
53
208
|
}
|
data/gnip-ruby.gemspec
CHANGED
@@ -1,25 +1,22 @@
|
|
1
|
+
## gnip-ruby.gemspec
|
2
|
+
#
|
1
3
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
Gem::Specification::new do |spec|
|
5
|
+
spec.name = "gnip"
|
6
|
+
spec.version = "1.1.2"
|
7
|
+
spec.platform = Gem::Platform::RUBY
|
8
|
+
spec.summary = "gnip"
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
10
|
+
spec.files = ["bin", "bin/gnip", "doc", "doc/api.html", "gnip-ruby.gemspec", "lib", "lib/gnip", "lib/gnip/activity.rb", "lib/gnip/api.rb", "lib/gnip/arguments.rb", "lib/gnip/blankslate.rb", "lib/gnip/config.rb", "lib/gnip/filter.rb", "lib/gnip/list.rb", "lib/gnip/options.rb", "lib/gnip/orderedhash.rb", "lib/gnip/publisher.rb", "lib/gnip/resource.rb", "lib/gnip/template.rb", "lib/gnip/util.rb", "lib/gnip.rb", "Rakefile", "README", "sample", "sample/data", "sample/data/activity.yml", "test", "test/auth.rb", "test/config.yml", "test/data", "test/data/activity.xml", "test/data/activity_only_required.xml", "test/data/activity_with_payload.xml", "test/data/activity_with_place.xml", "test/data/activity_with_place_wo_bounds.xml", "test/data/activity_with_unbounded_media_urls.xml", "test/data/activity_without_bounds.xml", "test/helper.rb", "test/integration", "test/integration/auth.rb", "test/integration/publisher.rb", "test/lib", "test/lib/shoulda", "test/lib/shoulda/action_controller", "test/lib/shoulda/action_controller/helpers.rb", "test/lib/shoulda/action_controller/macros.rb", "test/lib/shoulda/action_controller/matchers", "test/lib/shoulda/action_controller/matchers/assign_to_matcher.rb", "test/lib/shoulda/action_controller/matchers/filter_param_matcher.rb", "test/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb", "test/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb", "test/lib/shoulda/action_controller/matchers/respond_with_matcher.rb", "test/lib/shoulda/action_controller/matchers/route_matcher.rb", "test/lib/shoulda/action_controller/matchers/set_session_matcher.rb", "test/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb", "test/lib/shoulda/action_controller/matchers.rb", "test/lib/shoulda/action_controller.rb", "test/lib/shoulda/action_mailer", "test/lib/shoulda/action_mailer/assertions.rb", "test/lib/shoulda/action_mailer.rb", "test/lib/shoulda/action_view", "test/lib/shoulda/action_view/macros.rb", "test/lib/shoulda/action_view.rb", "test/lib/shoulda/active_record", "test/lib/shoulda/active_record/assertions.rb", "test/lib/shoulda/active_record/helpers.rb", "test/lib/shoulda/active_record/macros.rb", "test/lib/shoulda/active_record/matchers", "test/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb", "test/lib/shoulda/active_record/matchers/allow_value_matcher.rb", "test/lib/shoulda/active_record/matchers/association_matcher.rb", "test/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb", "test/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb", "test/lib/shoulda/active_record/matchers/have_db_column_matcher.rb", "test/lib/shoulda/active_record/matchers/have_index_matcher.rb", "test/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb", "test/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validation_matcher.rb", "test/lib/shoulda/active_record/matchers.rb", "test/lib/shoulda/active_record.rb", "test/lib/shoulda/assertions.rb", "test/lib/shoulda/autoload_macros.rb", "test/lib/shoulda/context.rb", "test/lib/shoulda/helpers.rb", "test/lib/shoulda/macros.rb", "test/lib/shoulda/private_helpers.rb", "test/lib/shoulda/proc_extensions.rb", "test/lib/shoulda/rails.rb", "test/lib/shoulda/rspec.rb", "test/lib/shoulda/tasks", "test/lib/shoulda/tasks/list_tests.rake", "test/lib/shoulda/tasks/yaml_to_shoulda.rake", "test/lib/shoulda/tasks.rb", "test/lib/shoulda/test_unit.rb", "test/lib/shoulda.rb", "test/lib/xmlsimple.rb", "test/loader.rb", "test/unit", "test/unit/activity.rb", "test/unit/util.rb", "TODO"]
|
11
|
+
spec.executables = ["gnip"]
|
12
|
+
|
13
|
+
spec.require_path = "lib"
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
#spec.add_dependency 'lib', '>= version'
|
16
|
-
#spec.add_dependency 'fattr'
|
17
|
-
|
18
|
-
spec.extensions.push(*["rakefile", "Rakefile"])
|
19
|
-
|
20
|
-
spec.rubyforge_project = 'codeforpeople'
|
21
|
-
spec.author = "Ara T. Howard"
|
22
|
-
spec.email = "ara.t.howard@gmail.com"
|
23
|
-
spec.homepage = "http://github.com/ahoward/gnip/tree/master"
|
24
|
-
end
|
15
|
+
spec.has_rdoc = true
|
16
|
+
spec.test_files = nil
|
25
17
|
|
18
|
+
spec.rubyforge_project = "gnip"
|
19
|
+
spec.author = "Ara T. Howard"
|
20
|
+
spec.email = "ara.t.howard@gmail.com"
|
21
|
+
spec.homepage = "http://github.com/gnip/gnip-ruby/tree/master"
|
22
|
+
end
|
data/lib/gnip.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ara T. Howard
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-10 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -17,9 +17,8 @@ description:
|
|
17
17
|
email: ara.t.howard@gmail.com
|
18
18
|
executables:
|
19
19
|
- gnip
|
20
|
-
extensions:
|
21
|
-
|
22
|
-
- Rakefile
|
20
|
+
extensions: []
|
21
|
+
|
23
22
|
extra_rdoc_files: []
|
24
23
|
|
25
24
|
files:
|
@@ -27,7 +26,6 @@ files:
|
|
27
26
|
- bin/gnip
|
28
27
|
- doc
|
29
28
|
- doc/api.html
|
30
|
-
- gemspec.rb
|
31
29
|
- gnip-ruby.gemspec
|
32
30
|
- lib
|
33
31
|
- lib/gnip
|
@@ -130,7 +128,7 @@ files:
|
|
130
128
|
- test/unit/util.rb
|
131
129
|
- TODO
|
132
130
|
has_rdoc: true
|
133
|
-
homepage: http://github.com/
|
131
|
+
homepage: http://github.com/gnip/gnip-ruby/tree/master
|
134
132
|
post_install_message:
|
135
133
|
rdoc_options: []
|
136
134
|
|
@@ -150,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
148
|
version:
|
151
149
|
requirements: []
|
152
150
|
|
153
|
-
rubyforge_project:
|
151
|
+
rubyforge_project: gnip
|
154
152
|
rubygems_version: 1.3.1
|
155
153
|
signing_key:
|
156
154
|
specification_version: 2
|
data/gemspec.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
Gem::Specification::new do |spec|
|
3
|
-
spec.name = "gnip"
|
4
|
-
spec.version = "1.1.1"
|
5
|
-
spec.platform = Gem::Platform::RUBY
|
6
|
-
spec.summary = "gnip"
|
7
|
-
|
8
|
-
spec.files = ["bin", "bin/gnip", "doc", "doc/api.html", "gemspec.rb", "gnip-ruby.gemspec", "lib", "lib/gnip", "lib/gnip/activity.rb", "lib/gnip/api.rb", "lib/gnip/arguments.rb", "lib/gnip/blankslate.rb", "lib/gnip/config.rb", "lib/gnip/filter.rb", "lib/gnip/list.rb", "lib/gnip/options.rb", "lib/gnip/orderedhash.rb", "lib/gnip/publisher.rb", "lib/gnip/resource.rb", "lib/gnip/template.rb", "lib/gnip/util.rb", "lib/gnip.rb", "Rakefile", "README", "sample", "sample/data", "sample/data/activity.yml", "test", "test/auth.rb", "test/config.yml", "test/data", "test/data/activity.xml", "test/data/activity_only_required.xml", "test/data/activity_with_payload.xml", "test/data/activity_with_place.xml", "test/data/activity_with_place_wo_bounds.xml", "test/data/activity_with_unbounded_media_urls.xml", "test/data/activity_without_bounds.xml", "test/helper.rb", "test/integration", "test/integration/auth.rb", "test/integration/publisher.rb", "test/lib", "test/lib/shoulda", "test/lib/shoulda/action_controller", "test/lib/shoulda/action_controller/helpers.rb", "test/lib/shoulda/action_controller/macros.rb", "test/lib/shoulda/action_controller/matchers", "test/lib/shoulda/action_controller/matchers/assign_to_matcher.rb", "test/lib/shoulda/action_controller/matchers/filter_param_matcher.rb", "test/lib/shoulda/action_controller/matchers/render_with_layout_matcher.rb", "test/lib/shoulda/action_controller/matchers/respond_with_content_type_matcher.rb", "test/lib/shoulda/action_controller/matchers/respond_with_matcher.rb", "test/lib/shoulda/action_controller/matchers/route_matcher.rb", "test/lib/shoulda/action_controller/matchers/set_session_matcher.rb", "test/lib/shoulda/action_controller/matchers/set_the_flash_matcher.rb", "test/lib/shoulda/action_controller/matchers.rb", "test/lib/shoulda/action_controller.rb", "test/lib/shoulda/action_mailer", "test/lib/shoulda/action_mailer/assertions.rb", "test/lib/shoulda/action_mailer.rb", "test/lib/shoulda/action_view", "test/lib/shoulda/action_view/macros.rb", "test/lib/shoulda/action_view.rb", "test/lib/shoulda/active_record", "test/lib/shoulda/active_record/assertions.rb", "test/lib/shoulda/active_record/helpers.rb", "test/lib/shoulda/active_record/macros.rb", "test/lib/shoulda/active_record/matchers", "test/lib/shoulda/active_record/matchers/allow_mass_assignment_of_matcher.rb", "test/lib/shoulda/active_record/matchers/allow_value_matcher.rb", "test/lib/shoulda/active_record/matchers/association_matcher.rb", "test/lib/shoulda/active_record/matchers/ensure_inclusion_of_matcher.rb", "test/lib/shoulda/active_record/matchers/ensure_length_of_matcher.rb", "test/lib/shoulda/active_record/matchers/have_db_column_matcher.rb", "test/lib/shoulda/active_record/matchers/have_index_matcher.rb", "test/lib/shoulda/active_record/matchers/have_named_scope_matcher.rb", "test/lib/shoulda/active_record/matchers/have_readonly_attribute_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_acceptance_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_numericality_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_presence_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validate_uniqueness_of_matcher.rb", "test/lib/shoulda/active_record/matchers/validation_matcher.rb", "test/lib/shoulda/active_record/matchers.rb", "test/lib/shoulda/active_record.rb", "test/lib/shoulda/assertions.rb", "test/lib/shoulda/autoload_macros.rb", "test/lib/shoulda/context.rb", "test/lib/shoulda/helpers.rb", "test/lib/shoulda/macros.rb", "test/lib/shoulda/private_helpers.rb", "test/lib/shoulda/proc_extensions.rb", "test/lib/shoulda/rails.rb", "test/lib/shoulda/rspec.rb", "test/lib/shoulda/tasks", "test/lib/shoulda/tasks/list_tests.rake", "test/lib/shoulda/tasks/yaml_to_shoulda.rake", "test/lib/shoulda/tasks.rb", "test/lib/shoulda/test_unit.rb", "test/lib/shoulda.rb", "test/lib/xmlsimple.rb", "test/loader.rb", "test/unit", "test/unit/activity.rb", "test/unit/util.rb", "TODO"]
|
9
|
-
spec.executables = ["gnip"]
|
10
|
-
|
11
|
-
spec.require_path = "lib"
|
12
|
-
|
13
|
-
spec.has_rdoc = true
|
14
|
-
spec.test_files = nil
|
15
|
-
#spec.add_dependency 'lib', '>= version'
|
16
|
-
#spec.add_dependency 'fattr'
|
17
|
-
|
18
|
-
spec.extensions.push(*["rakefile", "Rakefile"])
|
19
|
-
|
20
|
-
spec.rubyforge_project = 'codeforpeople'
|
21
|
-
spec.author = "Ara T. Howard"
|
22
|
-
spec.email = "ara.t.howard@gmail.com"
|
23
|
-
spec.homepage = "http://github.com/ahoward/gnip/tree/master"
|
24
|
-
end
|
25
|
-
|
data/rakefile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
task 'default' => 'test:all'
|
2
|
-
|
3
|
-
namespace 'test' do
|
4
|
-
desc 'run all tests'
|
5
|
-
task 'all' => %w[ unit integration ] do
|
6
|
-
end
|
7
|
-
|
8
|
-
desc 'run unit tests'
|
9
|
-
task 'unit' do
|
10
|
-
%w[
|
11
|
-
activity
|
12
|
-
].each do |basename|
|
13
|
-
test_loader "test/unit/#{ basename }.rb"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
desc 'run integration tests'
|
18
|
-
task 'integration' do
|
19
|
-
%w[
|
20
|
-
auth
|
21
|
-
publisher
|
22
|
-
].each do |basename|
|
23
|
-
test_loader "test/integration/#{ basename }.rb", :require_auth => true
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
task 'test' => 'test:all' do
|
29
|
-
end
|
30
|
-
|
31
|
-
namespace 'gem' do
|
32
|
-
task 'build' do
|
33
|
-
sh 'gemspec.rb'
|
34
|
-
end
|
35
|
-
task 'release' => 'build' do
|
36
|
-
gem = Dir['gnip*.gem'].sort.last or abort('no gem!')
|
37
|
-
version = gem[%r/[\d.]+/]
|
38
|
-
command = "rubyforge login && rubyforge add_release gnip 'gnip' '#{ version }' '#{ gem }'"
|
39
|
-
sh command
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
BEGIN {
|
44
|
-
Dir.chdir(File.dirname(__FILE__))
|
45
|
-
ENV['PATH'] = [ '.', './bin/', ENV['PATH'] ].join(File::PATH_SEPARATOR)
|
46
|
-
|
47
|
-
def test_loader basename, options = {}
|
48
|
-
auth = '-r test/auth.rb ' if options[:require_auth]
|
49
|
-
command = "ruby -r test/loader.rb #{ auth }#{ basename }"
|
50
|
-
STDERR.print "\n==== TEST ====\n\n #{ command }\n\n==============\n\n"
|
51
|
-
system command or abort("#{ command } # FAILED WITH #{ $?.inspect }")
|
52
|
-
end
|
53
|
-
}
|