rack_clicky 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
1
+ require 'rake/clean'
2
2
  require 'rake/testtask'
3
-
3
+ require 'fileutils'
4
4
 
5
5
  Rake::TestTask.new(:test) do |test|
6
6
  test.libs << 'lib' << 'test'
@@ -8,5 +8,62 @@ Rake::TestTask.new(:test) do |test|
8
8
  test.verbose = true
9
9
  end
10
10
 
11
-
12
11
  task :default => :test
12
+
13
+ ###### Packaging
14
+
15
+ def package_version
16
+ @package_version ||= begin
17
+ unless defined? RackClicky::Version
18
+ load './lib/rack_clicky/version.rb'
19
+ end
20
+ RackClicky::VERSION
21
+ end
22
+ end
23
+
24
+ if defined? Gem
25
+ def spec
26
+ require 'rubygems' unless defined? Gem::Specification
27
+ @spec || eval(File.read('rack_clicky.gemspec'))
28
+ end
29
+
30
+ def package(ext = '')
31
+ "pkg/rack_clicky-#{spec.version}" + ext
32
+ end
33
+
34
+ desc "Build rack_clicky packages"
35
+ task :package => %w[.gem .tar.gz].map {|e| package(e)}
36
+
37
+ desc "Install rack_clicky locally"
38
+ task :install => package('.gem') do
39
+ sh "gem install #{package('.gem')}"
40
+ end
41
+
42
+ directory "pkg/"
43
+ CLOBBER.include "pkg/"
44
+
45
+ file package(".gem") => %w[pkg/ rack_clicky.gemspec] + spec.files do |f|
46
+ sh "gem build rack_clicky.gemspec"
47
+ mv File.basename(f.name), f.name
48
+ end
49
+
50
+ file package(".tar.gz") => %w[pkg/] + spec.files do |f|
51
+ sh <<-SH
52
+ git archive \
53
+ --prefix=rack_clicky-#{package_version}/ \
54
+ --format=tar \
55
+ HEAD | gzip > #{f.name}
56
+ SH
57
+ end
58
+
59
+ desc "Release rack_clicky"
60
+ task :release => ['test', package(".gem")] do
61
+ sh <<-SH
62
+ gem push #{package(".gem")} &&
63
+ git commit --allow-empty -a -m '#{package_version} release' &&
64
+ git tag -s v#{package_version} -m '#{package_version} release' &&
65
+ git push &&
66
+ git push --tags
67
+ SH
68
+ end
69
+ end
@@ -1,3 +1,3 @@
1
1
  module RackClicky
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_clicky
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
16
- requirement: &70332207633160 !ruby/object:Gem::Requirement
16
+ requirement: &70351107538640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70332207633160
24
+ version_requirements: *70351107538640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rack
27
- requirement: &70332207632620 !ruby/object:Gem::Requirement
27
+ requirement: &70351107537260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70332207632620
35
+ version_requirements: *70351107537260
36
36
  description: Embeds the Clicky tracking code at the end of your HTML
37
37
  email:
38
38
  - mark@amerine.net
@@ -42,8 +42,6 @@ extra_rdoc_files: []
42
42
  files:
43
43
  - .document
44
44
  - .gitignore
45
- - Gemfile
46
- - Gemfile.lock
47
45
  - LICENSE
48
46
  - README.rdoc
49
47
  - Rakefile
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in rack_clicky.gemspec
4
- gemspec
@@ -1,18 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rack_clicky (1.0.3)
5
- rack
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- minitest (2.11.1)
11
- rack (1.4.1)
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- minitest
18
- rack_clicky!