filament 0.3.0 → 0.4.0

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 (41) hide show
  1. data/CHANGES +96 -0
  2. data/README +2 -2
  3. data/lib/filament.rb +1 -1
  4. data/lib/filament/block_object.rb +11 -0
  5. data/lib/filament/os.rb +0 -3
  6. data/lib/filament/platform.rb +16 -0
  7. data/lib/filament/resolver.rb +2 -1
  8. data/lib/filament/target.rb +118 -10
  9. data/lib/filament/util/filelist2.rb +1 -1
  10. data/lib/filament/util/lazy_list.rb +9 -9
  11. data/plugins/00util/lib/filament/plugins/util.rb +18 -0
  12. data/plugins/01java/lib/filament/java/library.rb +88 -0
  13. data/plugins/{02javame/lib/filament/javame → 01java/lib/filament/java}/tasks/library_task.rb +86 -63
  14. data/plugins/01java/lib/filament/java/tools.rb +1 -0
  15. data/plugins/01java/lib/filament/java/tools/compile.rb +2 -2
  16. data/plugins/01java/lib/filament/java/tools/execute.rb +16 -9
  17. data/plugins/01java/lib/filament/java/tools/jar.rb +1 -1
  18. data/plugins/01java/lib/filament/java/tools/javadoc.rb +22 -0
  19. data/plugins/01java/lib/filament/java/tools/proguard.rb +1 -0
  20. data/plugins/{02javame → 01java}/lib/filament/javame/suite.rb +20 -22
  21. data/plugins/{02javame → 01java}/lib/filament/javame/tasks.rb +0 -1
  22. data/plugins/{02javame → 01java}/lib/filament/javame/tools.rb +0 -1
  23. data/plugins/{02javame → 01java}/lib/filament/javame/tools/descriptor.rb +19 -7
  24. data/plugins/{02javame → 01java}/lib/filament/javame/tools/emulator.rb +0 -1
  25. data/plugins/{02javame → 01java}/lib/filament/javame/tools/external/mpp_sdk.rb +0 -0
  26. data/plugins/{02javame → 01java}/lib/filament/javame/tools/external/wtk.rb +0 -0
  27. data/plugins/{02javame → 01java}/lib/filament/javame/tools/preverifier.rb +0 -2
  28. data/plugins/01java/lib/filament/javase/application.rb +43 -0
  29. data/plugins/01java/lib/filament/javase/tasks.rb +1 -0
  30. data/plugins/01java/lib/init.rb +16 -0
  31. data/plugins/04spin/lib/filament/spin/sji.rb +17 -19
  32. data/plugins/04spin/lib/filament/spin/tasks/sji_task.rb +11 -10
  33. data/plugins/04spin/lib/spin/sji.rb +371 -170
  34. data/plugins/05push/lib/filament/plugins/push.rb +6 -9
  35. data/plugins/05push/lib/filament/push.rb +1 -1
  36. data/plugins/05push/lib/filament/push/conduits/filter_conduit.rb +1 -1
  37. metadata +74 -64
  38. data/CHANGELOG +0 -81
  39. data/plugins/02javame/lib/filament/javame/library.rb +0 -79
  40. data/plugins/02javame/lib/filament/javame/tools/platform.rb +0 -50
  41. data/plugins/02javame/lib/init.rb +0 -14
@@ -3,16 +3,13 @@ require 'filament/plugin'
3
3
  module Filament::Plugins
4
4
  class Push < Filament::Plugin
5
5
  def initialize(app)
6
- app.subcommand('push', "Pushes deployables to selected PUSH_CONDUIT") do |args|
7
- targets = Filament::TargetList.new(*args)
8
- push_conduit = ENV['PUSH_CONDUIT'] || :Filter
6
+ push_conduit = ENV['PUSH_CONDUIT'] || :Filter
9
7
 
10
- targets.each do |target|
11
- target.build do
12
- klass = Filament::Push::Conduits.module_eval(push_conduit.to_s + 'Conduit')
13
- conduit = klass.new
14
- conduit.push_targets(targets)
15
- end
8
+ Filament::Target.on_define do |target|
9
+ task :push do
10
+ klass = Filament::Push::Conduits.module_eval(push_conduit.to_s + 'Conduit')
11
+ conduit = klass.new
12
+ conduit.push_targets([target])
16
13
  end
17
14
  end
18
15
  end
@@ -9,7 +9,7 @@ module Filament::Push
9
9
  files << deployable
10
10
  end
11
11
  end
12
-
12
+
13
13
  push_files(files)
14
14
  end
15
15
 
@@ -4,7 +4,7 @@ module Filament::Push::Conduits
4
4
  def initialize(filter = nil)
5
5
  @filter = filter || ENV['PUSH_FILTER']
6
6
 
7
- raise "@filter must be set" if @filter.nil?
7
+ raise "PUSH_FILTER must be set" if @filter.nil?
8
8
  end
9
9
 
10
10
  def push_files(files)
metadata CHANGED
@@ -3,13 +3,19 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: filament
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
7
- date: 2006-04-03 00:00:00 -04:00
6
+ version: 0.4.0
7
+ date: 2006-05-04 00:00:00 -04:00
8
8
  summary: A flexible dependency-based build platform based on Rake
9
9
  require_paths:
10
10
  - lib
11
+ - plugins/11http/lib
12
+ - plugins/01java/lib
13
+ - plugins/05push/lib
14
+ - plugins/10svn/lib
15
+ - plugins/00util/lib
16
+ - plugins/04spin/lib
11
17
  email: ajb@rubyforge.org
12
- homepage: http://filament.rubyforge.org
18
+ homepage: http://www.software4i.com/projects/filament
13
19
  rubyforge_project: filament
14
20
  description:
15
21
  autorequire:
@@ -29,90 +35,83 @@ authors:
29
35
  - Adam Bouhenguel
30
36
  files:
31
37
  - bin/filament
32
- - bin/filament-dbg
33
38
  - bin/filament-opt
39
+ - bin/filament-dbg
34
40
  - bin/filament-test
35
41
  - tests/platform_test.rb
36
42
  - lib/filament
37
43
  - lib/filament.rb
38
44
  - lib/inflector.rb
45
+ - lib/filament/util
46
+ - lib/filament/plugin.rb
47
+ - lib/filament/workspace.rb
39
48
  - lib/filament/context.rb
40
- - lib/filament/os.rb
41
49
  - lib/filament/package.rb
42
- - lib/filament/platform.rb
43
- - lib/filament/plugin.rb
50
+ - lib/filament/block_object.rb
51
+ - lib/filament/os.rb
44
52
  - lib/filament/resolver.rb
53
+ - lib/filament/platform.rb
45
54
  - lib/filament/target.rb
46
- - lib/filament/util
47
- - lib/filament/workspace.rb
48
- - lib/filament/util/filelist2.rb
49
55
  - lib/filament/util/fileutils.rb
56
+ - lib/filament/util/filelist2.rb
50
57
  - lib/filament/util/lazy_list.rb
51
- - plugins/00util
58
+ - plugins/11http
52
59
  - plugins/01java
53
- - plugins/02javame
54
- - plugins/04spin
55
60
  - plugins/05push
56
61
  - plugins/10svn
57
- - plugins/11http
58
- - plugins/00util/lib
59
- - plugins/00util/lib/filament
60
- - plugins/00util/lib/init.rb
61
- - plugins/00util/lib/filament/plugins
62
- - plugins/00util/lib/filament/plugins/util.rb
62
+ - plugins/00util
63
+ - plugins/04spin
64
+ - plugins/11http/lib
65
+ - plugins/11http/lib/filament
66
+ - plugins/11http/lib/init.rb
67
+ - plugins/11http/lib/filament/plugins
68
+ - plugins/11http/lib/filament/scm
69
+ - plugins/11http/lib/filament/plugins/http.rb
70
+ - plugins/11http/lib/filament/scm/http.rb
63
71
  - plugins/01java/lib
64
72
  - plugins/01java/lib/filament
65
73
  - plugins/01java/lib/init.rb
66
74
  - plugins/01java/lib/filament/java
67
75
  - plugins/01java/lib/filament/plugins
68
- - plugins/01java/lib/filament/java/mixins
76
+ - plugins/01java/lib/filament/javame
77
+ - plugins/01java/lib/filament/javase
69
78
  - plugins/01java/lib/filament/java/tools
79
+ - plugins/01java/lib/filament/java/mixins
70
80
  - plugins/01java/lib/filament/java/tools.rb
71
- - plugins/01java/lib/filament/java/mixins/classpath.rb
72
- - plugins/01java/lib/filament/java/tools/compile.rb
81
+ - plugins/01java/lib/filament/java/tasks
82
+ - plugins/01java/lib/filament/java/library.rb
73
83
  - plugins/01java/lib/filament/java/tools/execute.rb
84
+ - plugins/01java/lib/filament/java/tools/javadoc.rb
74
85
  - plugins/01java/lib/filament/java/tools/jar.rb
75
86
  - plugins/01java/lib/filament/java/tools/proguard.rb
87
+ - plugins/01java/lib/filament/java/tools/compile.rb
88
+ - plugins/01java/lib/filament/java/mixins/classpath.rb
89
+ - plugins/01java/lib/filament/java/tasks/library_task.rb
76
90
  - plugins/01java/lib/filament/plugins/java.rb
77
- - plugins/02javame/lib
78
- - plugins/02javame/lib/filament
79
- - plugins/02javame/lib/init.rb
80
- - plugins/02javame/lib/filament/javame
81
- - plugins/02javame/lib/filament/javame/library.rb
82
- - plugins/02javame/lib/filament/javame/suite.rb
83
- - plugins/02javame/lib/filament/javame/tasks
84
- - plugins/02javame/lib/filament/javame/tasks.rb
85
- - plugins/02javame/lib/filament/javame/tools
86
- - plugins/02javame/lib/filament/javame/tools.rb
87
- - plugins/02javame/lib/filament/javame/tasks/library_task.rb
88
- - plugins/02javame/lib/filament/javame/tools/descriptor.rb
89
- - plugins/02javame/lib/filament/javame/tools/emulator.rb
90
- - plugins/02javame/lib/filament/javame/tools/external
91
- - plugins/02javame/lib/filament/javame/tools/platform.rb
92
- - plugins/02javame/lib/filament/javame/tools/preverifier.rb
93
- - plugins/02javame/lib/filament/javame/tools/external/mpp_sdk.rb
94
- - plugins/02javame/lib/filament/javame/tools/external/wtk.rb
95
- - plugins/04spin/lib
96
- - plugins/04spin/lib/filament
97
- - plugins/04spin/lib/init.rb
98
- - plugins/04spin/lib/spin
99
- - plugins/04spin/lib/filament/spin
100
- - plugins/04spin/lib/filament/spin/sji.rb
101
- - plugins/04spin/lib/filament/spin/tasks
102
- - plugins/04spin/lib/filament/spin/tasks/sji_task.rb
103
- - plugins/04spin/lib/spin/sji.rb
91
+ - plugins/01java/lib/filament/javame/tools
92
+ - plugins/01java/lib/filament/javame/tools.rb
93
+ - plugins/01java/lib/filament/javame/tasks.rb
94
+ - plugins/01java/lib/filament/javame/suite.rb
95
+ - plugins/01java/lib/filament/javame/tools/external
96
+ - plugins/01java/lib/filament/javame/tools/descriptor.rb
97
+ - plugins/01java/lib/filament/javame/tools/preverifier.rb
98
+ - plugins/01java/lib/filament/javame/tools/emulator.rb
99
+ - plugins/01java/lib/filament/javame/tools/external/mpp_sdk.rb
100
+ - plugins/01java/lib/filament/javame/tools/external/wtk.rb
101
+ - plugins/01java/lib/filament/javase/application.rb
102
+ - plugins/01java/lib/filament/javase/tasks.rb
104
103
  - plugins/05push/lib
105
- - plugins/05push/lib/bluetooth.rb
106
104
  - plugins/05push/lib/filament
107
105
  - plugins/05push/lib/init.rb
108
- - plugins/05push/lib/filament/plugins
106
+ - plugins/05push/lib/bluetooth.rb
109
107
  - plugins/05push/lib/filament/push
108
+ - plugins/05push/lib/filament/plugins
110
109
  - plugins/05push/lib/filament/push.rb
111
- - plugins/05push/lib/filament/plugins/push.rb
112
110
  - plugins/05push/lib/filament/push/conduits
113
111
  - plugins/05push/lib/filament/push/conduits/bluetooth_conduit.rb
114
- - plugins/05push/lib/filament/push/conduits/filter_conduit.rb
115
112
  - plugins/05push/lib/filament/push/conduits/scp_conduit.rb
113
+ - plugins/05push/lib/filament/push/conduits/filter_conduit.rb
114
+ - plugins/05push/lib/filament/plugins/push.rb
116
115
  - plugins/10svn/lib
117
116
  - plugins/10svn/lib/filament
118
117
  - plugins/10svn/lib/init.rb
@@ -121,22 +120,33 @@ files:
121
120
  - plugins/10svn/lib/filament/scm
122
121
  - plugins/10svn/lib/filament/plugins/svn.rb
123
122
  - plugins/10svn/lib/filament/scm/svn.rb
124
- - plugins/11http/lib
125
- - plugins/11http/lib/filament
126
- - plugins/11http/lib/init.rb
127
- - plugins/11http/lib/filament/plugins
128
- - plugins/11http/lib/filament/scm
129
- - plugins/11http/lib/filament/plugins/http.rb
130
- - plugins/11http/lib/filament/scm/http.rb
123
+ - plugins/00util/lib
124
+ - plugins/00util/lib/filament
125
+ - plugins/00util/lib/init.rb
126
+ - plugins/00util/lib/filament/plugins
127
+ - plugins/00util/lib/filament/plugins/util.rb
128
+ - plugins/04spin/lib
129
+ - plugins/04spin/lib/filament
130
+ - plugins/04spin/lib/spin
131
+ - plugins/04spin/lib/init.rb
132
+ - plugins/04spin/lib/filament/spin
133
+ - plugins/04spin/lib/filament/spin/tasks
134
+ - plugins/04spin/lib/filament/spin/sji.rb
135
+ - plugins/04spin/lib/filament/spin/tasks/sji_task.rb
136
+ - plugins/04spin/lib/spin/sji.rb
131
137
  - README
132
- - CHANGELOG
138
+ - CHANGES
133
139
  test_files: []
134
140
 
135
- rdoc_options: []
136
-
141
+ rdoc_options:
142
+ - --title
143
+ - Filament -- Pragmatic build control
144
+ - --main
145
+ - README
146
+ - --line-numbers
137
147
  extra_rdoc_files:
138
148
  - README
139
- - CHANGELOG
149
+ - CHANGES
140
150
  executables:
141
151
  - filament
142
152
  extensions: []
data/CHANGELOG DELETED
@@ -1,81 +0,0 @@
1
- 0.3.0:
2
- Filament:
3
- - Updated Target#output to optionally take a block as output value
4
- - Renamed Scm => SCM
5
- - Created CompoundSCM to manage many SCMs
6
- - Moved Filament::Platform module to Filament::OS
7
- - Created Platform class, to manage platforms - use Platform.import(<yaml>)
8
- - Replaced Artifact with Target
9
- - FileList2 now has a tag attribute, allowing to set the tag it uses to resolve targets
10
- - Added dependence on mechanize gem
11
- - [FIXED] create scms with realpath, not package
12
- HTTP Plugin:
13
- - Uses mechanize to crawl a page for links
14
- - Added plugin to manage pulling stuff from the web
15
- - Future support may include pushing stuff to the web (over webdav)
16
- Spin Plugin:
17
- - Added libs for generating sji (both java and spin) interfaces
18
- - creates a target with :java and :spin source outputs
19
- - outputs a jad_proc to add entries for interpreter startup
20
-
21
- Java Plugin:
22
- - Dropped use of JAVAC, JAR, etc. to just use java_bin('javac'), etc.
23
- JavaME Plugin:
24
- - Merged Library and Suite functionality into a single rake tasklib
25
- - Simplified Library and Suite artifacts
26
-
27
- 0.2.3:
28
- SVN Plugin:
29
- - Fixed an svn include problem
30
- - Fixed the svn commands to work with new package.scm
31
-
32
- 0.2.2:
33
- Filament:
34
- - Fixed handling for scm actions for packages without scm
35
-
36
- 0.2.1:
37
- Filament:
38
- - Added ability to create workspace, package
39
- - Added ability to checkout (and create) a package
40
- - Can now execute the filament command outside a workspace
41
- - Moved svn parts to PackageScm
42
- - Supports in place to work with other forms of version control
43
-
44
- 0.2.0:
45
- Filament:
46
- - removed old tests
47
- - Using cmdparse gem; One action per command
48
- - added dependency on memoize gem
49
- - general cleanup
50
- All Plugins:
51
- - Plugins now extend Filament::Plugin where necessary
52
- JavaME Plugin:
53
- - Moved vendor-specific stuff to tasks.rb in //vendor/libraries/javame
54
- SVN Plugin:
55
- - Created svn plugin, should make it easier to support other version control schemes in the future
56
-
57
- 0.1.2:
58
- JavaME Plugin:
59
- - Changed the default for obfuscating JavaME::Suite targets to false.
60
-
61
- 0.1.1:
62
- Filament:
63
- - Packages can't be hidden directories now
64
- - Doesn't force working_dir and output_dir creation
65
- - Package descriptor is now /package.rb instead of rakefile.rb
66
- - package.rb is now evaluated within the scope of the Package object.
67
- - targets are now defined by target(name, class, &block)
68
- - future cleanups code cleanups will benefit from the two above items.
69
- All Plugins:
70
- - Updated external path references (Wtk, MppSdk, Proguard classes) to only use ENV
71
- - Added ENV support for WTK_HOME, MPP_SDK_HOME, PROGUARD_HOME
72
- Java Plugin:
73
- - Added support for Proguard obfuscation
74
- - Targets can output a 1-argument-block tagged :proguard and configure the obfuscator for dependencies
75
- JavaME Plugin:
76
- - Suite now takes itself into account when traversing deps for :jad_config outputs
77
- - Obfuscation is available if you set obfuscate to true -- will auto-detect in the future
78
-
79
- 0.1.0:
80
- Filament:
81
- - Initial Release
@@ -1,79 +0,0 @@
1
- require 'filament/java/mixins/classpath'
2
- require 'filament/javame/tasks/library_task'
3
-
4
- module Filament::JavaME
5
- class Library < Filament::Target
6
- include Filament::Java::Mixins::Classpath
7
-
8
- attr_accessor2 :obfuscate
9
-
10
- attr_writer :should_package_deps
11
- attr_reader :srcs, :resources, :platform, :cldc_version
12
-
13
- def custom_entries(h)
14
- @custom_entries.merge!(h)
15
- end
16
-
17
- def append_entries(h)
18
- h.keys.each do |key|
19
- @append_entries[key] ||= []
20
- entry = h[key]
21
- if entry.is_a?(Array)
22
- @append_entries[key] += entry
23
- else
24
- @append_entries[key] << entry
25
- end
26
- end
27
- end
28
-
29
- def init
30
- @srcs = Filament::FileList2.new
31
- @srcs.tag = :java
32
-
33
- @resources = Filament::FileList2.new
34
- @should_package_deps = false
35
-
36
- @platform = Filament::JavaME::Tools.tags_for($target_platform)
37
- @cldc_version = Filament::JavaME::Tools.cldc_version_for($target_platform)
38
- @bootclasspath = Filament::JavaME::Tools.classpath_for($target_platform)
39
-
40
- @custom_classpath = []
41
-
42
- @append_entries = {}
43
- @custom_entries = {}
44
- end
45
-
46
- def define
47
- @library = Filament::JavaME::Tasks::LibraryTask.new do |l|
48
- define_library(l)
49
- end
50
-
51
- output :tag => [:default, :jar],
52
- :output => @library.jar_path,
53
- :deployable => true,
54
- :tasks => @library.tasks
55
-
56
- output :tag => :jad_proc do |d|
57
- d.append_entries(@append_entries)
58
- d.custom_entries(@custom_entries)
59
- end
60
- end
61
-
62
- def define_library(l)
63
- l.working_dir = working_dir
64
- l.output_dir = output_dir
65
- l.name = name
66
- l.classpath = classpath
67
- l.bootclasspath = @bootclasspath
68
- l.srcs = @srcs
69
-
70
- l.resources = @resources + (@should_package_deps ? flattened_deps_jars : [])
71
-
72
- l.task_deps << package.descriptor
73
-
74
- l.proguard_proc = Proc.new do |o|
75
- flattened_deps.collect{|dep| dep[:proguard_proc]}.compact.each{|p| p.call(o)}
76
- end
77
- end
78
- end
79
- end
@@ -1,50 +0,0 @@
1
- require 'filament/platform'
2
-
3
- module Filament::JavaME
4
- module Tools
5
- TAGS = {}
6
- TARGET_PLATFORMS = {}
7
-
8
- class << self
9
- def platform(model)
10
- p = Filament::Platform.find(:name => model)
11
- raise "Unknown target platform: #{model}" if p.nil?
12
- raise "Not a JavaME platform: #{p.inspect}, #{p.tags.inspect}" unless p.tags.include?(:javame)
13
- return p
14
- end
15
-
16
- def tags_for(model)
17
- return platform(model).tags.clone
18
- end
19
-
20
- def cldc_version_for(model)
21
- return platform(model).javame_configuration_version
22
- end
23
-
24
- def classpath_for(model)
25
- cldc_version = cldc_version_for(model)
26
-
27
- base_classpath = platform(model).classpath
28
-
29
- classpath = []
30
- classpath += base_classpath unless base_classpath.nil?
31
-
32
- case cldc_version
33
- when 1.0
34
- classpath << "#{SUN_DIR}/cldcapi10.jar"
35
- when 1.1
36
- classpath << "#{SUN_DIR}/cldcapi11.jar"
37
- end
38
-
39
- tags = tags_for(model)
40
-
41
- tags.each do |tag|
42
- tag_classpath = TAGS[tag]
43
- classpath += tag_classpath unless tag_classpath.nil?
44
- end
45
-
46
- return classpath
47
- end
48
- end
49
- end
50
- end