userscripts_org 0.0.1 → 0.0.2

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 +15 -2
  2. data/Rakefile +2 -3
  3. data/bin/userjs +22 -3
  4. data/lib/userscripts_org.rb +1 -1
  5. metadata +2 -2
data/ChangeLog CHANGED
@@ -1,4 +1,17 @@
1
- == 0.0.1 / 2008-01-11
1
+ ChangeLog of http://svn.coderepos.org/share/lang/ruby/userscripts_org/trunk
2
2
 
3
- * initial release
3
+ 2008-01-11 cho45
4
+
5
+ * [new] @4445:
6
+ Support multi platform (but Windows)
7
+
8
+ * [bug] @4437:
9
+ Fix -l option behavior (until now, always turned on it)
10
+
11
+ * [release] @4430:
12
+ Release 0.0.1
13
+
14
+ * [release] @4428:
15
+ Release 0.0.0
16
+ (0.0.0 is misstake)
4
17
 
data/Rakefile CHANGED
@@ -119,18 +119,17 @@ Rake::ShipitTask.new do |s|
119
119
  s.Step.new {
120
120
  system("svn", "up")
121
121
  }.and {}
122
- s.Task :rubyforge
123
122
  s.Step.new {
124
123
  raise "changelog-with-hatenastar.rb is not found" unless system("which", "changelog-with-hatenastar.rb")
125
124
  }.and {
126
- system("changelog-with-hatenastar.rb")
125
+ system("changelog-with-hatenastar.rb > ChangeLog")
127
126
  }
128
127
  s.ChangeVersion "lib/userscripts_org.rb", "VERSION"
129
128
  s.Commit
130
- s.Skip
131
129
  s.Task :clean, :package
132
130
  s.RubyForge
133
131
  s.Tag
134
132
  s.Twitter
133
+ s.Task :rubyforge
135
134
  end
136
135
 
data/bin/userjs CHANGED
@@ -153,6 +153,7 @@ class UserjsCommand
153
153
  file = Pathname.new(@argv.first).realpath
154
154
  prev = scan
155
155
  install_userjs(file)
156
+ return unless @symlink
156
157
  installed = catch(:break) {
157
158
  loop do
158
159
  scan.each do |f,time|
@@ -183,8 +184,16 @@ class UserjsCommand
183
184
  end
184
185
 
185
186
  def profile_dir
186
- home = Pathname.new ENV["HOME"]
187
- home + "Library/Application Support/Firefox/Profiles"
187
+ dir = nil
188
+ case RUBY_PLATFORM
189
+ when /darwin/
190
+ dir = "~/Library/Application Support/Firefox/Profiles"
191
+ when /win/
192
+ dir = "~/Application Data/Mozilla/Firefox/Profiles"
193
+ when
194
+ dir = "~/.mozilla/firefox"
195
+ end
196
+ Pathname.new(dir).expand_path
188
197
  end
189
198
 
190
199
  def scan
@@ -195,7 +204,17 @@ class UserjsCommand
195
204
  end
196
205
 
197
206
  def install_userjs(path)
198
- system("open", "-a", "Firefox", path.to_s)
207
+ case RUBY_PLATFORM
208
+ when /darwin/
209
+ system("open", "-a", "Firefox", path.to_s)
210
+ when /cygwin/
211
+ warn "You must associate .js to Firefox."
212
+ system("cygstart", path.to_s)
213
+ when /win/
214
+ abort "Not supported OS #{RUBY_PLATFORM}"
215
+ when
216
+ system("firefox", path.to_s)
217
+ end
199
218
  puts "Complete the install on Firefox"
200
219
  end
201
220
  end
@@ -8,7 +8,7 @@ require "ostruct"
8
8
  require "uri"
9
9
 
10
10
  class UserscriptsOrg
11
- VERSION = "0.0.1"
11
+ VERSION = "0.0.2"
12
12
 
13
13
  class UserscriptsOrgError < StandardError; end
14
14
  class NotLoggedinError < UserscriptsOrgError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: userscripts_org
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cho45
@@ -9,7 +9,7 @@ autorequire: ""
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-11 00:00:00 +09:00
12
+ date: 2008-01-12 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency