jnlp 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A gem for encapsulating the content and resources referenced by Java Web Start jnlps
4
4
 
5
- Complete rdoc available here: http://rubywebstart.rubyforge.org/jnlp/rdoc/
5
+ Complete rdoc available here: http://rubywebstart.rubyforge.org/jnlp/Jnlp/Jnlp.html
6
6
 
7
7
  For more information about the structure of Java Web Start see:
8
8
 
@@ -24,4 +24,20 @@ Once the Jnlp object is created you can call Jnlp#cache_resources to create a lo
24
24
 
25
25
  The structure of the cache directory and the naming using for the jar and nativelib files is the same as that used by the Java Web Start Download Servlet, see:
26
26
 
27
- http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/downloadservletguide.html
27
+ http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/downloadservletguide.html
28
+
29
+ == Building the gem
30
+
31
+ === First patch Hoe
32
+
33
+ Hoe versions 1.11.0 and 1.11.1 do not work with JRuby.
34
+
35
+ To build the gem you will need to apply this patch to Hoe:
36
+ 0001-install_gem-nows-works-with-jruby-also.patch[http://gist.github.com/raw/87670/7bd12ecff3e27dd0a1a1d750b61d4efece372374/0001-install_gem-nows-works-with-jruby-also.patch]
37
+
38
+ === The source code
39
+
40
+ The source code for the jnlp gem is on github[http://github.com/stepheneb/jnlp/tree/master].
41
+
42
+ git clone git://github.com/stepheneb/jnlp.git
43
+
data/Rakefile CHANGED
@@ -12,3 +12,8 @@ Hoe.new('jnlp', Jnlp::VERSION) do |p|
12
12
  p.description = "For manipulation of Java Web Start Jnlps and the resources they reference."
13
13
  p.extra_deps << ['hpricot','=0.6.164']
14
14
  end
15
+
16
+ task :default => :spec
17
+ Spec::Rake::SpecTask.new do |t|
18
+ t.spec_files = FileList["spec/**/*_spec.rb"]
19
+ end
data/config/hoe.rb CHANGED
@@ -55,7 +55,6 @@ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
55
55
  p.url = HOMEPATH
56
56
  p.remote_rdoc_dir = 'jnlp' # Release to root
57
57
  p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
58
- p.test_globs = ["test/**/test_*.rb"]
59
58
  p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
60
59
 
61
60
  # == Optional
data/lib/jnlp/jnlp.rb CHANGED
@@ -189,6 +189,13 @@ module Jnlp #:nodoc:
189
189
  #
190
190
  # "net/sf/sail/webstart-proxy/jetty-proxy/jetty-proxy.jar"
191
191
  #
192
+ attr_reader :main
193
+ #
194
+ # Contains a boolean that repesents whether the main_class for this
195
+ # jnlp is contained within this jar.
196
+ # This attribute is optional in a jnlp and if present should
197
+ # only be present and set to true on one jar resource in a jnlp.
198
+ #
192
199
  attr_reader :href
193
200
  #
194
201
  # Contains the url reference to the resource
@@ -213,6 +220,14 @@ module Jnlp #:nodoc:
213
220
  #
214
221
  # "httpclient__V0.1.0-20071212.220020-17.jar"
215
222
  #
223
+ attr_reader :suffix
224
+ #
225
+ # Contains the suffix of the resource
226
+ #
227
+ # Example:
228
+ #
229
+ # "__V0.1.0.jar"
230
+ #
216
231
  attr_reader :filename
217
232
  #
218
233
  # Contains the filename of the gzipped pack200 version of the resource
@@ -221,6 +236,14 @@ module Jnlp #:nodoc:
221
236
  #
222
237
  # "httpclient__V0.1.0-20071212.220020-17.jar.pack.gz"
223
238
  #
239
+ attr_reader :filename_pack
240
+ #
241
+ # Contains the filename of the pack200 version of the resource
242
+ #
243
+ # Example:
244
+ #
245
+ # "httpclient__V0.1.0-20071212.220020-17.jar.pack"
246
+ #
224
247
  attr_reader :filename_pack_gz
225
248
  #
226
249
  # Contains the size of the resource
@@ -332,6 +355,7 @@ module Jnlp #:nodoc:
332
355
  def initialize(res, codebase, os)
333
356
  @resource = res
334
357
  @kind = res.name
358
+ @main = res['main'] && res['main'] == 'true'
335
359
  @href = res['href']
336
360
  @href_path = File.dirname(@href)
337
361
  if @href_path == '.'
@@ -562,37 +586,8 @@ module Jnlp #:nodoc:
562
586
  #
563
587
  # Note:
564
588
  #
565
- # The current Hpricot v6.0 Gem does not work with JRuby 1.1 release candidates
566
- #
567
- # You can get a version that does work here:
568
- #
569
- # http://www.telscenter.org/confluence/download/attachments/20236/hpricot-0.6.159-java.gem
570
- #
571
- # After you download it -- install it like this:
572
- #
573
- # jruby -S gem install pkg/hpricot-0.6.159-jruby.gem
574
- #
575
- # FYI: If you need to build it yourself (Nick Sieger's patch still applies
576
- # cleanly to the current trunk revision: 161 of Hpricot):
577
- #
578
- # svn co https://code.whytheluckystiff.net/svn/hpricot/trunk hpricot
579
- # cd hpricot
580
- # curl http://caldersphere.net/hpricot-0.6.157-jruby-trunk.patch > hpricot-0.6.157-jruby-trunk.patch
581
- # patch -p0 -i hpricot-0.6.157-jruby-trunk.patch
582
- # jruby -S rake package_jruby
583
- #
584
- # You'll find the gem here:
585
- #
586
- # pkg/hpricot-0.6.159-jruby.gem
587
- #
588
- # If you want to run the tests (there is only one failing test in JRuby Hpricot, C Hpricot has two different failures):
589
- #
590
- # jruby -S rake hpricot_java
591
- # jruby -S rake test
592
- #
593
- # I reported all this on why's tracker for hpricot:
594
- #
595
- # https://code.whytheluckystiff.net/hpricot/ticket/131#comment:1
589
+ # The jnlp gem has a dependency on hpricot version 0.6.164.
590
+ # The most recent version of hpricot, version 0.7.0 does not yet work with JRuby.
596
591
  #
597
592
  class Jnlp
598
593
  #
@@ -846,6 +841,7 @@ module Jnlp #:nodoc:
846
841
  @title = (info/"title").inner_html
847
842
  @vendor = (info/"vendor").inner_html
848
843
  @homepage = (info/"homepage").empty? ? '' : (info/"homepage").attr('href')
844
+ @description = (info/"description").empty? ? '' : (info/"description").inner_html
849
845
  icon = (info/"icon")
850
846
  @icon = Icon.new(icon) unless icon.empty?
851
847
  @offline_allowed = (info/"offline-allowed") ? true : false
@@ -133,9 +133,16 @@ module Jnlp #:nodoc:
133
133
  @snapshot = versioned_jnlp_url
134
134
  end
135
135
  end
136
-
137
136
  end
138
137
  end
138
+
139
+ def update
140
+
141
+ end
142
+
143
+ def latest_snapshot_version
144
+ open("#{@url}/#{@name}-CURRENT_VERSION.txt").read
145
+ end
139
146
  end
140
147
 
141
148
  # == MavenJnlp
data/lib/jnlp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Jnlp #:nodoc:
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  #
4
4
  # Let's see if this patch:
5
5
  #
data/lib/jnlp.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
+ require 'rubygems'
5
+
6
+ gem 'hpricot', '=0.6.164'
7
+
4
8
  module Jnlp
5
9
  require 'jnlp/jnlp.rb'
6
10
  require 'jnlp/otrunk.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jnlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Bannasch
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-30 00:00:00 -04:00
12
+ date: 2009-05-30 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.1
33
+ version: 1.12.1.1
34
34
  version:
35
35
  description: For manipulation of Java Web Start Jnlps and the resources they reference.
36
36
  email: stephen.bannasch@gmail.com
@@ -75,6 +75,8 @@ files:
75
75
  - website/template.html.erb
76
76
  has_rdoc: true
77
77
  homepage: http://rubywebstart.rubyforge.org/jnlp/rdoc/
78
+ licenses: []
79
+
78
80
  post_install_message:
79
81
  rdoc_options:
80
82
  - --main
@@ -96,9 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  requirements: []
97
99
 
98
100
  rubyforge_project: rubywebstart
99
- rubygems_version: 1.3.1
101
+ rubygems_version: 1.3.3
100
102
  signing_key:
101
- specification_version: 2
103
+ specification_version: 3
102
104
  summary: Ruby tools for working with Java Web Start JNLPs.
103
105
  test_files:
104
106
  - test/test_helper.rb