jrubyfx 1.1.1-java → 1.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,7 @@ class Java::javafx::stage::Stage
72
72
  #
73
73
  def layout_scene(*args, &code)
74
74
  root = code.arity == 1 ? code[node] : instance_eval(&code)
75
- build(Scene, root, *args).tap { |scene| set_scene scene }
75
+ build(Java::JavafxScene::Scene, root, *args).tap { |scene| set_scene scene }
76
76
  end
77
77
 
78
78
  def fxml(source, options={})
@@ -48,7 +48,7 @@ module JRubyFX
48
48
  # of built-in components.
49
49
  #
50
50
  def register_type(type=self, name=nil)
51
- name = type.name.snake_case unless name
51
+ name = type.name.snake_case(true) unless name
52
52
  JRubyFX::DSL::NAME_TO_CLASSES[name.to_s] = type
53
53
  end
54
54
  module_function :register_type
@@ -196,7 +196,7 @@ module JRubyFX
196
196
  },
197
197
  rotate: ->(on){
198
198
  " def rotate(*args)
199
- transforms << build(Rotate, *args)
199
+ transforms << build(#{JRubyFX::DSL::NAME_TO_CLASS_NAME['rotate']}, *args)
200
200
  end\n"
201
201
  },
202
202
  method_missing: ->(on, type) {
@@ -40,14 +40,24 @@ end
40
40
  # Standard ruby String class extensions
41
41
  class String
42
42
  # call-seq:
43
- # snake_case() => string
43
+ # snake_case(ignore_prefix_namespace=false) => string
44
44
  #
45
45
  # Converts a CamelCaseString to a snake_case_string
46
46
  #
47
47
  # "JavaFX".snake_case #=> "java_fx"
48
48
  #
49
- def snake_case
50
- self.gsub(/::/, '/').
49
+ # If ignore_prefix_namespace is specified it will strip
50
+ # any preceding modules/classes off front of string before
51
+ # snake casing:
52
+ # Foo::BigBar #=> "big_bar"
53
+ #
54
+ # By default it will separate modules with a "/":
55
+ # Foo::BigBar #=> "foo/big_bar"
56
+ #
57
+ def snake_case(ignore_prefix_namespace=false)
58
+ base = ignore_prefix_namespace ?
59
+ self.gsub(/.*::/, '') : self.gsub(/::/, '/')
60
+ base.
51
61
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
52
62
  gsub(/([a-z\d])([A-Z])/,'\1_\2').
53
63
  tr("-", "_").
@@ -1,4 +1,4 @@
1
1
  module JRubyFX
2
2
  # Current gem version. Used in rake task.
3
- VERSION='1.1.1'
3
+ VERSION='1.2.0'
4
4
  end
@@ -161,7 +161,9 @@ module JRubyFX
161
161
  def compile(cmdline)
162
162
  require 'jrubyfx/compiler_app'
163
163
  $JRUBYFX_AOT_COMPILING = true
164
+ $JRUBYFX_AOT_ERROR = false
164
165
  CompilerApp.launch(*cmdline) # must use this to provide a full javafx environ so controls will build properly
166
+ raise $JRUBYFX_AOT_ERROR if $JRUBYFX_AOT_ERROR
165
167
  end
166
168
 
167
169
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jrubyfx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Patrick Plenefisch
@@ -11,50 +11,50 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-11-05 00:00:00.000000000 Z
14
+ date: 2016-12-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rake
18
- version_requirements: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
23
17
  requirement: !ruby/object:Gem::Requirement
24
18
  requirements:
25
- - - '>='
19
+ - - ">="
26
20
  - !ruby/object:Gem::Version
27
21
  version: '0'
22
+ name: rake
28
23
  prerelease: false
29
24
  type: :development
30
- - !ruby/object:Gem::Dependency
31
- name: rspec
32
25
  version_requirements: !ruby/object:Gem::Requirement
33
26
  requirements:
34
- - - '>='
27
+ - - ">="
35
28
  - !ruby/object:Gem::Version
36
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
37
31
  requirement: !ruby/object:Gem::Requirement
38
32
  requirements:
39
- - - '>='
33
+ - - ">="
40
34
  - !ruby/object:Gem::Version
41
35
  version: '0'
36
+ name: rspec
42
37
  prerelease: false
43
38
  type: :development
44
- - !ruby/object:Gem::Dependency
45
- name: jrubyfx-fxmlloader
46
39
  version_requirements: !ruby/object:Gem::Requirement
47
40
  requirements:
48
- - - '>='
41
+ - - ">="
49
42
  - !ruby/object:Gem::Version
50
- version: '0.4'
43
+ version: '0'
44
+ - !ruby/object:Gem::Dependency
51
45
  requirement: !ruby/object:Gem::Requirement
52
46
  requirements:
53
- - - '>='
47
+ - - ">="
54
48
  - !ruby/object:Gem::Version
55
49
  version: '0.4'
50
+ name: jrubyfx-fxmlloader
56
51
  prerelease: false
57
52
  type: :runtime
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0.4'
58
58
  description: Enables JavaFX with FXML controllers and application in pure ruby
59
59
  email:
60
60
  - simonpatp@gmail.com
@@ -68,28 +68,30 @@ executables:
68
68
  extensions: []
69
69
  extra_rdoc_files: []
70
70
  files:
71
+ - LICENSE
72
+ - README.md
73
+ - bin/jrubyfx-compile
74
+ - bin/jrubyfx-generator
75
+ - bin/jrubyfx-jarify
71
76
  - lib/jrubyfx.rb
72
- - lib/jrubyfx_tasks.rb
73
- - lib/jrubyfx/imports.rb
74
- - lib/jrubyfx/dsl_map.rb
75
77
  - lib/jrubyfx/application.rb
76
78
  - lib/jrubyfx/compiler_app.rb
77
79
  - lib/jrubyfx/controller.rb
78
- - lib/jrubyfx/dsl.rb
79
- - lib/jrubyfx/dsl_control.rb
80
- - lib/jrubyfx/java_fx_impl.rb
81
- - lib/jrubyfx/part_imports.rb
82
- - lib/jrubyfx/utils.rb
83
- - lib/jrubyfx/version.rb
84
- - lib/jrubyfx/module.rb
85
80
  - lib/jrubyfx/core_ext/border_pane.rb
86
81
  - lib/jrubyfx/core_ext/column_constraints.rb
87
82
  - lib/jrubyfx/core_ext/drag_event.rb
88
83
  - lib/jrubyfx/core_ext/duration.rb
89
84
  - lib/jrubyfx/core_ext/effects.rb
85
+ - lib/jrubyfx/core_ext/exts.yml
86
+ - lib/jrubyfx/core_ext/file_chooser.rb
87
+ - lib/jrubyfx/core_ext/geometry.rb
88
+ - lib/jrubyfx/core_ext/grid_pane.rb
90
89
  - lib/jrubyfx/core_ext/image_view.rb
91
90
  - lib/jrubyfx/core_ext/media_player.rb
91
+ - lib/jrubyfx/core_ext/observable_value.rb
92
92
  - lib/jrubyfx/core_ext/pagination.rb
93
+ - lib/jrubyfx/core_ext/path.rb
94
+ - lib/jrubyfx/core_ext/precompiled.rb
93
95
  - lib/jrubyfx/core_ext/progress_indicator.rb
94
96
  - lib/jrubyfx/core_ext/radial_gradient.rb
95
97
  - lib/jrubyfx/core_ext/region.rb
@@ -100,22 +102,20 @@ files:
100
102
  - lib/jrubyfx/core_ext/transition.rb
101
103
  - lib/jrubyfx/core_ext/tree_view.rb
102
104
  - lib/jrubyfx/core_ext/xy_chart.rb
103
- - lib/jrubyfx/core_ext/precompiled.rb
104
- - lib/jrubyfx/core_ext/exts.yml
105
- - lib/jrubyfx/core_ext/file_chooser.rb
106
- - lib/jrubyfx/core_ext/geometry.rb
107
- - lib/jrubyfx/core_ext/grid_pane.rb
108
- - lib/jrubyfx/core_ext/observable_value.rb
109
- - lib/jrubyfx/core_ext/path.rb
105
+ - lib/jrubyfx/dsl.rb
106
+ - lib/jrubyfx/dsl_control.rb
107
+ - lib/jrubyfx/dsl_map.rb
108
+ - lib/jrubyfx/imports.rb
109
+ - lib/jrubyfx/java_fx_impl.rb
110
+ - lib/jrubyfx/module.rb
111
+ - lib/jrubyfx/part_imports.rb
112
+ - lib/jrubyfx/utils.rb
110
113
  - lib/jrubyfx/utils/__ignore_java_stupid_rdoc.rb
111
- - lib/jrubyfx/utils/common_utils.rb
112
114
  - lib/jrubyfx/utils/common_converters.rb
115
+ - lib/jrubyfx/utils/common_utils.rb
113
116
  - lib/jrubyfx/utils/string_utils.rb
114
- - LICENSE
115
- - README.md
116
- - bin/jrubyfx-generator
117
- - bin/jrubyfx-jarify
118
- - bin/jrubyfx-compile
117
+ - lib/jrubyfx/version.rb
118
+ - lib/jrubyfx_tasks.rb
119
119
  homepage: https://github.com/jruby/jrubyfx
120
120
  licenses:
121
121
  - Apache-2.0
@@ -126,17 +126,17 @@ require_paths:
126
126
  - lib
127
127
  required_ruby_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - '>='
134
+ - - ">="
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project: jrubyfx
139
- rubygems_version: 2.1.9
139
+ rubygems_version: 2.6.8
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: JavaFX for JRuby with FXML