hatenaapigraph 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,103 +1,83 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'rake/clean'
4
- require 'rake/testtask'
5
- require 'rake/packagetask'
6
1
  require 'rake/gempackagetask'
7
- require 'rake/rdoctask'
8
- require 'rake/contrib/rubyforgepublisher'
9
- require 'fileutils'
10
- include FileUtils
11
- require File.join(File.dirname(__FILE__), 'lib', 'hatena', 'api', 'graph')
12
-
13
- AUTHOR = "gorou"
14
- EMAIL = "your contact email for bug fixes and info"
15
- DESCRIPTION = "description of gem"
16
- RUBYFORGE_PROJECT = "hatenaapigraph"
17
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
18
- BIN_FILES = %w( )
19
-
20
-
21
- NAME = "hatenaapigraph"
22
- REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
23
- VERS = ENV['VERSION'] || (Hatena::API::Graph::VERSION::STRING + (REV ? ".#{REV}" : ""))
24
- CLEAN.include ['**/.*.sw?', '*.gem', '.config']
25
- RDOC_OPTS = ['--quiet', '--title', "hatenaapigraph documentation",
26
- "--opname", "index.html",
27
- "--line-numbers",
28
- "--main", "README",
29
- "--inline-source"]
30
-
31
- desc "Packages up hatenaapigraph gem."
32
- task :default => [:test]
33
- task :package => [:clean]
34
-
35
- Rake::TestTask.new("test") { |t|
36
- t.libs << "test"
37
- t.pattern = "test/**/*_test.rb"
38
- t.verbose = true
39
- }
40
-
41
- spec =
42
- Gem::Specification.new do |s|
43
- s.name = NAME
44
- s.version = VERS
45
- s.platform = Gem::Platform::RUBY
46
- s.has_rdoc = true
47
- s.extra_rdoc_files = ["README", "CHANGELOG"]
48
- s.rdoc_options += RDOC_OPTS + ['--exclude', '^(examples|extras)/']
49
- s.summary = DESCRIPTION
50
- s.description = DESCRIPTION
51
- s.author = AUTHOR
52
- s.email = EMAIL
53
- s.homepage = HOMEPATH
54
- s.executables = BIN_FILES
55
- s.rubyforge_project = RUBYFORGE_PROJECT
56
- s.bindir = "bin"
57
- s.require_path = "lib"
58
- s.autorequire = "hatenaapigraph"
59
-
60
- #s.add_dependency('activesupport', '>=1.3.1')
61
- #s.required_ruby_version = '>= 1.8.2'
62
-
63
- s.files = %w(README CHANGELOG Rakefile) +
64
- Dir.glob("{bin,doc,test,lib,templates,generator,extras,website,script}/**/*") +
65
- Dir.glob("ext/**/*.{h,c,rb}") +
66
- Dir.glob("examples/**/*.rb") +
67
- Dir.glob("tools/*.rb")
68
-
69
- # s.extensions = FileList["ext/**/extconf.rb"].to_a
70
- end
71
-
72
- Rake::GemPackageTask.new(spec) do |p|
73
- p.need_tar = true
74
- p.gem_spec = spec
2
+
3
+ require 'rbconfig'
4
+ include Config
5
+
6
+ PKG_NAME = 'hatenaapigraph'
7
+ PKG_VERSION = File.read('VERSION').chomp
8
+ PKG_FILES = FileList["**/*"].exclude(".svn").exclude("pkg")
9
+
10
+ desc "Installing library"
11
+ task :install do
12
+ ruby 'install.rb'
13
+ end
14
+
15
+ desc "Testing library"
16
+ task :test do
17
+ # ruby 'test/method_test.rb'
75
18
  end
76
19
 
77
- task :install do
78
- name = "#{NAME}-#{VERS}.gem"
79
- sh %{rake package}
80
- sh %{sudo gem install pkg/#{name}}
20
+ desc "Removing generated files"
21
+ task :clean do
22
+ rm_rf 'doc'
81
23
  end
82
24
 
83
- task :uninstall => [:clean] do
84
- sh %{sudo gem uninstall #{NAME}}
25
+ # Create RDOC documentation.
26
+ task :doc do
27
+ sh 'rdoc -d -S -o doc README lib/hatena/api/graph.rb'
28
+ end
29
+
30
+ spec = Gem::Specification.new do |s|
31
+ #### Basic information.
32
+
33
+ s.name = 'hatenaapigraph'
34
+ s.version = PKG_VERSION
35
+ s.summary = "Hatena Graph API."
36
+ s.description = ""
37
+
38
+ #### Dependencies and requirements.
39
+
40
+ s.add_dependency('json', '>= 0.4.1')
41
+ s.requirements << "json"
42
+
43
+ s.files = PKG_FILES
44
+
45
+ #### C code extensions.
46
+
47
+ #s.extensions << "ext/extconf.rb"
48
+
49
+ #### Load-time details: library and application (you will need one or both).
50
+
51
+ s.require_path = 'lib' # Use these for libraries.
52
+ s.autorequire = 'hatena/api/graph'
53
+
54
+ # s.bindir = "bin" # Use these for applications.
55
+ # s.executables = ["hatenaapigraph.rb"]
56
+ # s.default_executable = "hatenaapigraph.rb"
57
+
58
+ #### Documentation and testing.
59
+
60
+ s.has_rdoc = true
61
+ #s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
62
+ s.extra_rdoc_files = 'README'
63
+ s.rdoc_options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
64
+ #s.rdoc_options <<
65
+ # '--title' << 'Rake -- Ruby Make' <<
66
+ # '--main' << 'README' <<
67
+ # '--line-numbers'
68
+ #s.test_files << 'test/method_test.rb'
69
+
70
+ #### Author and project details.
71
+
72
+ s.author = "Yuichi Tateno"
73
+ s.email = "secondlife@no.spam@hatena.ne.jp"
74
+ s.homepage = "http://hatenaapigraph.rubyforge.net"
75
+ s.rubyforge_project = "hatenaapigraph"
85
76
  end
86
77
 
87
- Rake::RDocTask.new { |rdoc|
88
- rdoc.rdoc_dir = 'html'
89
- rdoc.options += RDOC_OPTS
90
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
91
- if ENV['DOC_FILES']
92
- rdoc.rdoc_files.include(ENV['DOC_FILES'].split(/,\s*/))
93
- else
94
- rdoc.rdoc_files.include('README', 'CHANGELOG')
95
- rdoc.rdoc_files.include('lib/**/*.rb')
96
- end
97
- }
98
-
99
- desc "Publish to RubyForge"
100
- task :rubyforge => [:rdoc, :package] do
101
- Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, 'secondlife').upload
78
+ Rake::GemPackageTask.new(spec) do |pkg|
79
+ pkg.need_tar = true
80
+ pkg.package_files += PKG_FILES
102
81
  end
103
82
 
83
+ task :release => [ :clean, :package ]
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -10,14 +10,6 @@ module Hatena
10
10
  module API
11
11
  class GraphError < StandardError; end
12
12
  class Graph
13
- module VERSION #:nodoc:
14
- MAJOR = 0
15
- MINOR = 0
16
- TINY = 2
17
-
18
- STRING = [MAJOR, MINOR, TINY].join('.')
19
- end
20
-
21
13
  DATE_FORMAT = '%Y-%m-%d'
22
14
  GRAPH_API_URI = URI.parse 'http://graph.hatena.ne.jp/api/post'
23
15
 
metadata CHANGED
@@ -3,16 +3,16 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: hatenaapigraph
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.2
7
- date: 2006-11-06 00:00:00 +09:00
8
- summary: description of gem
6
+ version: 0.1.0
7
+ date: 2006-10-12 00:00:00 +09:00
8
+ summary: Hatena Graph API.
9
9
  require_paths:
10
10
  - lib
11
- email: your contact email for bug fixes and info
12
- homepage: http://hatenaapigraph.rubyforge.org
11
+ email: secondlife@no.spam@hatena.ne.jp
12
+ homepage: http://hatenaapigraph.rubyforge.net
13
13
  rubyforge_project: hatenaapigraph
14
- description: description of gem
15
- autorequire: hatenaapigraph
14
+ description: ""
15
+ autorequire: hatena/api/graph
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
@@ -26,39 +26,37 @@ platform: ruby
26
26
  signing_key:
27
27
  cert_chain:
28
28
  authors:
29
- - gorou
29
+ - Yuichi Tateno
30
30
  files:
31
- - README
32
- - CHANGELOG
31
+ - lib
32
+ - test
33
33
  - Rakefile
34
- - test/hatenaapigraph_test.rb
35
- - test/test_helper.rb
36
- - lib/hatenaapigraph
34
+ - README
35
+ - VERSION
37
36
  - lib/hatena
38
37
  - lib/hatena/api
39
38
  - lib/hatena/api/graph.rb
40
39
  test_files: []
41
40
 
42
41
  rdoc_options:
43
- - --quiet
44
- - --title
45
- - hatenaapigraph documentation
46
- - --opname
47
- - index.html
48
42
  - --line-numbers
49
- - --main
50
- - README
51
43
  - --inline-source
52
- - --exclude
53
- - ^(examples|extras)/
44
+ - -A cattr_accessor=object
54
45
  extra_rdoc_files:
55
46
  - README
56
- - CHANGELOG
57
47
  executables: []
58
48
 
59
49
  extensions: []
60
50
 
61
- requirements: []
62
-
63
- dependencies: []
64
-
51
+ requirements:
52
+ - json
53
+ dependencies:
54
+ - !ruby/object:Gem::Dependency
55
+ name: json
56
+ version_requirement:
57
+ version_requirements: !ruby/object:Gem::Version::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 0.4.1
62
+ version:
data/CHANGELOG DELETED
File without changes
@@ -1,11 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper.rb'
2
-
3
- class HatenaapigraphTest < Test::Unit::TestCase
4
-
5
- def setup
6
- end
7
-
8
- def test_truth
9
- assert true
10
- end
11
- end
data/test/test_helper.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'test/unit'
2
- require File.dirname(__FILE__) + '/../lib/hatena/api/graph'