hatenabm 0.1.0 → 0.1.1

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.
Files changed (5) hide show
  1. data/{ChangeLog → CHANGES} +3 -0
  2. data/README +8 -6
  3. data/Rakefile +159 -0
  4. data/lib/hatenabm.rb +0 -6
  5. metadata +18 -11
@@ -1,5 +1,8 @@
1
1
  = HatenaBM Changelog
2
2
 
3
+ == Version 0.1.1
4
+ fix bug (appear warnning message).
5
+
3
6
  == Version 0.1.0
4
7
  initial release
5
8
 
data/README CHANGED
@@ -1,9 +1,10 @@
1
1
  = HatenaBM
2
2
 
3
- HatenaBM is Hatena Bookmark (Japanese Social Bookmark Service) binding for Ruby.
3
+ HatenaBM is Hatena Bookmark binding for Ruby.
4
+ (Hatena Bookmark is Japanese Social Bookmark Service.)
4
5
 
5
- Hatena Bookmark : http://b.hatena.ne.jp
6
- Hatena Bookmark API Reference (Japanese) : http://d.hatena.ne.jp/keyword/%A4%CF%A4%C6%A4%CA%A5%D6%A5%C3%A5%AF%A5%DE%A1%BC%A5%AFAtomAPI
6
+ - Hatena Bookmark : http://b.hatena.ne.jp
7
+ - Hatena Bookmark API Reference (Japanese) : http://d.hatena.ne.jp/keyword/%A4%CF%A4%C6%A4%CA%A5%D6%A5%C3%A5%AF%A5%DE%A1%BC%A5%AFAtomAPI
7
8
 
8
9
  == Installation
9
10
 
@@ -29,7 +30,7 @@ Hatena Bookmark API Reference (Japanese) : http://d.hatena.ne.jp/keyword/%A4%CF%
29
30
  :summary => "this is example post." # description of this bookmark
30
31
  )
31
32
 
32
- # show recent bookmarks (Atom Format)
33
+ # show recent bookmarks (Atom Feed)
33
34
  pp hbm.recent
34
35
 
35
36
  # show specified bookmark
@@ -47,7 +48,8 @@ Hatena Bookmark API Reference (Japanese) : http://d.hatena.ne.jp/keyword/%A4%CF%
47
48
 
48
49
  == Author
49
50
  - drawnboy ( http://d.hatena.ne.jp/drawnboy ) <drawn.boy@gmail.com.nospam>
50
- - s-tanaka ( http://d.hatena.ne.jp/ha-tan )is written by get_wsse method
51
+ - s-tanaka wrote get_wsse method
51
52
  - gorou ( http://rails2u.com )
52
53
 
53
- License:: 2-clause BSD Lisence
54
+ == License
55
+ - 2-clause BSD Lisence
data/Rakefile ADDED
@@ -0,0 +1,159 @@
1
+ $:.unshift('lib')
2
+ require 'rubygems'
3
+ require 'meta_project'
4
+ require 'rake/gempackagetask'
5
+ require 'rake/contrib/rubyforgepublisher'
6
+ require 'rake/contrib/xforge'
7
+ require 'rake/clean'
8
+ require 'rake/testtask'
9
+ require 'rake/rdoctask'
10
+
11
+ PKG_NAME = "hatenabm"
12
+ # Versioning scheme: MAJOR.MINOR.PATCH
13
+ # MAJOR bumps when API is broken backwards
14
+ # MINOR bumps when the API is broken backwards in a very slight/subtle (but not fatal) way
15
+ # -OR when a new release is made and propaganda is sent out.
16
+ # PATCH is bumped for every API addition and/or bugfix (ideally for every commit)
17
+ # Later DamageControl can bump PATCH automatically.
18
+ #
19
+ # (This is subject to change - AH)
20
+ #
21
+ # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH CHANGELOG
22
+ PKG_VERSION = "0.1.1"
23
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
24
+ PKG_FILES = FileList[
25
+ '[A-Z]*',
26
+ 'lib/**/*.rb',
27
+ 'test/**/*.rb',
28
+ 'examples/**/*.rb',
29
+ 'doc/**/*'
30
+ ]
31
+
32
+ task :default => [:test]
33
+
34
+ #Rake::TestTask.new(:test) do |t|
35
+ # t.libs << "test"
36
+ # t.test_files = FileList['**/test*.rb']
37
+ # t.verbose = true
38
+ #end
39
+
40
+ # Create a task to build the RDOC documentation tree.
41
+ rd = Rake::RDocTask.new("rdoc") do |rdoc|
42
+ rdoc.rdoc_dir = 'html'
43
+ rdoc.title = "hatenabm"
44
+ rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
45
+ rdoc.rdoc_files.include('README', 'CHANGES')
46
+ rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
47
+ rdoc.rdoc_files.exclude('doc/**/*_attrs.rdoc')
48
+ end
49
+
50
+ # ====================================================================
51
+ # Create a task that will package the Rake software into distributable
52
+ # tar, zip and gem files.
53
+
54
+ spec = Gem::Specification.new do |s|
55
+
56
+ #### Basic information.
57
+
58
+ s.name = PKG_NAME
59
+ s.version = PKG_VERSION
60
+ s.summary = "Hatena Bookmark AtomAPI for Ruby"
61
+ s.description = <<-EOF
62
+ Hatena Bookmark is a social bookmark service in Japan. (http://b.hatena.ne.jp)
63
+
64
+ GET/POST/EDIT/DELETE Bookmark via this script.
65
+ EOF
66
+
67
+ s.files = PKG_FILES.to_a
68
+ s.require_path = 'lib'
69
+
70
+ #### Documentation and testing.
71
+
72
+ s.has_rdoc = true
73
+ s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
74
+ s.rdoc_options <<
75
+ '--title' << 'hatenabm' <<
76
+ '--main' << 'README' <<
77
+ '--line-numbers'
78
+
79
+ s.test_files = Dir.glob('test/test_*.rb')
80
+
81
+ #### Make executable
82
+ s.require_path = 'lib'
83
+ #s.autorequire = 'spec'
84
+
85
+ #### Author and project details.
86
+
87
+ s.author = "drawnboy"
88
+ s.email = "drawn.boy@gmail.com"
89
+ s.homepage = "http://hatenabm.rubyforge.org"
90
+ s.rubyforge_project = "hatenabm"
91
+ end
92
+
93
+ desc "Build Gem"
94
+ Rake::GemPackageTask.new(spec) do |pkg|
95
+ pkg.need_zip = true
96
+ pkg.need_tar = true
97
+ end
98
+ task :gem => [:test]
99
+
100
+ # Support Tasks ------------------------------------------------------
101
+
102
+ def egrep(pattern)
103
+ Dir['**/*.rb'].each do |fn|
104
+ count = 0
105
+ open(fn) do |f|
106
+ while line = f.gets
107
+ count += 1
108
+ if line =~ pattern
109
+ puts "#{fn}:#{count}:#{line}"
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
115
+
116
+ desc "Look for TODO and FIXME tags in the code"
117
+ task :todo do
118
+ egrep /#.*(FIXME|TODO|TBD)/
119
+ end
120
+
121
+ task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news]
122
+
123
+ task :verify_env_vars do
124
+ raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
125
+ raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
126
+ end
127
+
128
+ task :publish_doc => [:rdoc] do
129
+ publisher = Rake::RubyForgePublisher.new(PKG_NAME, ENV['RUBYFORGE_USER'])
130
+ publisher.upload
131
+ end
132
+
133
+ desc "Release gem to RubyForge. MAKE SURE PKG_VERSION is aligned with the CHANGELOG file"
134
+ task :release_files => [:gem] do
135
+ release_files = FileList[
136
+ "pkg/#{PKG_FILE_NAME}.gem"
137
+ ]
138
+
139
+ Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
140
+ # Never hardcode user name and password in the Rakefile!
141
+ xf.user_name = ENV['RUBYFORGE_USER']
142
+ xf.password = ENV['RUBYFORGE_PASSWORD']
143
+ xf.files = release_files.to_a
144
+ xf.release_name = "HatenaBM #{PKG_VERSION}"
145
+ end
146
+ end
147
+
148
+ desc "Publish news on RubyForge"
149
+ task :publish_news => [:gem] do
150
+ release_files = FileList[
151
+ "pkg/#{PKG_FILE_NAME}.gem"
152
+ ]
153
+
154
+ Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |news|
155
+ # Never hardcode user name and password in the Rakefile!
156
+ news.user_name = ENV['RUBYFORGE_USER']
157
+ news.password = ENV['RUBYFORGE_PASSWORD']
158
+ end
159
+ end
data/lib/hatenabm.rb CHANGED
@@ -23,8 +23,6 @@ end
23
23
 
24
24
  class HatenaBM
25
25
 
26
- VERSION = "0.0.3"
27
-
28
26
  HATENA_URL = "b.hatena.ne.jp"
29
27
  FEED_PATH = "/atom/feed"
30
28
  POST_PATH = "/atom/post"
@@ -37,7 +35,6 @@ class HatenaBM
37
35
  end
38
36
 
39
37
  # Post new bookmark
40
- # args: title, link, summary, tags
41
38
  def post(options)
42
39
  title = options[:title]
43
40
  link = options[:link]
@@ -77,7 +74,6 @@ class HatenaBM
77
74
  end
78
75
 
79
76
  # Get specified bookmark
80
- # args : eid
81
77
  def get(options)
82
78
  eid = options[:eid] || nil
83
79
  raise "Get Error : Invalid eid" if eid.nil?
@@ -92,7 +88,6 @@ class HatenaBM
92
88
  end
93
89
 
94
90
  # Modify specified bookmark
95
- # args: eid, title, tags
96
91
  def modify(options)
97
92
  eid = options[:eid] || nil
98
93
  title = options[:title] || nil
@@ -121,7 +116,6 @@ class HatenaBM
121
116
  end
122
117
 
123
118
  # Delete specified bookmark
124
- # args: eid
125
119
  def delete(options)
126
120
  eid = options[:eid] || nil
127
121
  raise "Delete Error : Invalid eid" if eid.nil?
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: hatenabm
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2005-10-14
8
- summary: Hatena Bookmark AtomAPI binding for Ruby
6
+ version: 0.1.1
7
+ date: 2005-12-22 00:00:00 +09:00
8
+ summary: Hatena Bookmark AtomAPI for Ruby
9
9
  require_paths:
10
10
  - lib
11
- email: drawn.boy@gmail.com.nospam
11
+ email: drawn.boy@gmail.com
12
12
  homepage: http://hatenabm.rubyforge.org
13
- rubyforge_project:
14
- description:
15
- autorequire: cool
13
+ rubyforge_project: hatenabm
14
+ description: Hatena Bookmark is a social bookmark service in Japan. (http://b.hatena.ne.jp) GET/POST/EDIT/DELETE Bookmark via this script.
15
+ autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
@@ -24,20 +24,27 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
24
24
  version: 0.0.0
25
25
  version:
26
26
  platform: ruby
27
+ signing_key:
28
+ cert_chain:
27
29
  authors:
28
30
  - drawnboy
29
31
  files:
30
- - test/test_hatenabm.rb
31
- - lib/hatenabm.rb
32
32
  - README
33
- - ChangeLog
33
+ - Rakefile
34
+ - CHANGES
35
+ - lib/hatenabm.rb
36
+ - test/test_hatenabm.rb
34
37
  test_files:
35
38
  - test/test_hatenabm.rb
36
39
  rdoc_options:
40
+ - "--title"
41
+ - hatenabm
37
42
  - "--main"
38
43
  - README
44
+ - "--line-numbers"
39
45
  extra_rdoc_files:
40
46
  - README
47
+ - CHANGES
41
48
  executables: []
42
49
  extensions: []
43
50
  requirements: []