From ad8f24d49c3257c2a365553d4e038b44eec7d5f1 Mon Sep 17 00:00:00 2001 From: Paul Colton Date: Mon, 24 Feb 2014 16:03:26 -0800 Subject: [PATCH] Update files to support Pixate Freestyle 2.1 --- Examples/HelloWorld/Gemfile | 2 +- Examples/HelloWorld/Rakefile | 6 ++---- Examples/HelloWorld/app/app_delegate.rb | 1 - .../HelloWorld/app/pixatefreestyle_code.rb | 7 +++++++ Examples/HelloWorld/resources/default.css | 5 ++++- Examples/HelloWorld/vendor/PXEngine.framework | 1 - .../vendor/PixateFreestyle.framework | 1 + lib/motion-pixate.rb | 1 - lib/motion-pixatefreestyle.rb | 1 + .../project/{pixate.rb => pixatefreestyle.rb} | 18 +++++++++--------- ...e.gemspec => motion-pixatefreestyle.gemspec | 9 +++++---- 11 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 Examples/HelloWorld/app/pixatefreestyle_code.rb delete mode 120000 Examples/HelloWorld/vendor/PXEngine.framework create mode 120000 Examples/HelloWorld/vendor/PixateFreestyle.framework delete mode 100644 lib/motion-pixate.rb create mode 100644 lib/motion-pixatefreestyle.rb rename lib/motion/project/{pixate.rb => pixatefreestyle.rb} (85%) rename motion-pixate.gemspec => motion-pixatefreestyle.gemspec (66%) diff --git a/Examples/HelloWorld/Gemfile b/Examples/HelloWorld/Gemfile index c638d64..21e8012 100644 --- a/Examples/HelloWorld/Gemfile +++ b/Examples/HelloWorld/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gem 'rake' # Add your dependencies here: -gem 'motion-pixate' +gem 'motion-pixatefreestyle' diff --git a/Examples/HelloWorld/Rakefile b/Examples/HelloWorld/Rakefile index eea8447..994059d 100644 --- a/Examples/HelloWorld/Rakefile +++ b/Examples/HelloWorld/Rakefile @@ -2,7 +2,7 @@ $:.unshift("/Library/RubyMotion/lib") require 'motion/project/template/ios' require 'rubygems' -require 'motion-pixate' +require 'motion-pixatefreestyle' begin require 'bundler' @@ -13,7 +13,5 @@ end Motion::Project::App.setup do |app| # Use `rake config' to see complete project settings. app.name = 'HelloWorld' - app.pixate.key = 'KEY CODE' - app.pixate.user = 'USER ID' - app.pixate.framework = 'vendor/PXEngine.framework' + app.pixatefreestyle.framework = 'vendor/PixateFreestyle.framework' end diff --git a/Examples/HelloWorld/app/app_delegate.rb b/Examples/HelloWorld/app/app_delegate.rb index 9723e13..4c8049e 100644 --- a/Examples/HelloWorld/app/app_delegate.rb +++ b/Examples/HelloWorld/app/app_delegate.rb @@ -4,7 +4,6 @@ class AppDelegate @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.rootViewController = HelloWorldController.alloc.init @window.rootViewController.wantsFullScreenLayout = true - @window.styleMode = PXStylingNormal @window.makeKeyAndVisible true diff --git a/Examples/HelloWorld/app/pixatefreestyle_code.rb b/Examples/HelloWorld/app/pixatefreestyle_code.rb new file mode 100644 index 0000000..56275b0 --- /dev/null +++ b/Examples/HelloWorld/app/pixatefreestyle_code.rb @@ -0,0 +1,7 @@ +# This file is automatically generated. Do not edit. + +def style(str) + PixateFreestyle.initializePixateFreestyle + PixateFreestyle.styleSheetFromSource(str, withOrigin:0) + PixateFreestyle.updateStylesForAllViews +end diff --git a/Examples/HelloWorld/resources/default.css b/Examples/HelloWorld/resources/default.css index df01162..72171a9 100644 --- a/Examples/HelloWorld/resources/default.css +++ b/Examples/HelloWorld/resources/default.css @@ -1,7 +1,10 @@ button { - text: Pixate Says Hello!; + text: Pixate Freestyle Rocks!; background-image: linear-gradient(blue, lightblue); border-radius: 10px; + border-style: solid; + border-width: 2px; + border-color: darkgray; } #myView { diff --git a/Examples/HelloWorld/vendor/PXEngine.framework b/Examples/HelloWorld/vendor/PXEngine.framework deleted file mode 120000 index 16355cd..0000000 --- a/Examples/HelloWorld/vendor/PXEngine.framework +++ /dev/null @@ -1 +0,0 @@ -/Users/pcolton/Library/Developer/Xcode/DerivedData/Pixate_Engine-cxbqfllitlqcspcaxewxldmpknhu/Build/Products/Debug-iphonesimulator/PXEngine.framework \ No newline at end of file diff --git a/Examples/HelloWorld/vendor/PixateFreestyle.framework b/Examples/HelloWorld/vendor/PixateFreestyle.framework new file mode 120000 index 0000000..0687751 --- /dev/null +++ b/Examples/HelloWorld/vendor/PixateFreestyle.framework @@ -0,0 +1 @@ +/Users/pcolton/Downloads/PixateFreestyle.framework \ No newline at end of file diff --git a/lib/motion-pixate.rb b/lib/motion-pixate.rb deleted file mode 100644 index 54b9b77..0000000 --- a/lib/motion-pixate.rb +++ /dev/null @@ -1 +0,0 @@ -require "motion/project/pixate" \ No newline at end of file diff --git a/lib/motion-pixatefreestyle.rb b/lib/motion-pixatefreestyle.rb new file mode 100644 index 0000000..b3ff2bc --- /dev/null +++ b/lib/motion-pixatefreestyle.rb @@ -0,0 +1 @@ +require "motion/project/pixatefreestyle" \ No newline at end of file diff --git a/lib/motion/project/pixate.rb b/lib/motion/project/pixatefreestyle.rb similarity index 85% rename from lib/motion/project/pixate.rb rename to lib/motion/project/pixatefreestyle.rb index d091cb3..2681b85 100644 --- a/lib/motion/project/pixate.rb +++ b/lib/motion/project/pixatefreestyle.rb @@ -2,8 +2,8 @@ unless defined?(Motion::Project::Config) raise "This file must be required within a RubyMotion project Rakefile." end -class PixateConfig - attr_accessor :framework, :user, :key +class PixateFreestyleConfig + attr_accessor :framework def initialize(config) @config = config @@ -25,12 +25,12 @@ class PixateConfig # This file is automatically generated. Do not edit. def style(str) - PixateFreestyle.initializePixateFreestyle() + PixateFreestyle.initializePixateFreestyle PixateFreestyle.styleSheetFromSource(str, withOrigin:0) - PixateFreestyle.applyStylesheets + PixateFreestyle.updateStylesForAllViews end EOF - pixate_file = './app/pixate_code.rb' + pixate_file = './app/pixatefreestyle_code.rb' create_stub(pixate_file, code) add_file(pixate_file) end @@ -49,15 +49,15 @@ end module Motion; module Project; class Config - variable :pixate + variable :pixatefreestyle - def pixate - @pixate ||= PixateConfig.new(self) + def pixatefreestyle + @pixatefreestyle ||= PixateFreestyleConfig.new(self) end end; end; end -namespace 'pixate' do +namespace 'pixatefreestyle' do desc "Create initial stylesheet files" task :init do if Dir.glob("sass/default.s[ac]ss").empty? diff --git a/motion-pixate.gemspec b/motion-pixatefreestyle.gemspec similarity index 66% rename from motion-pixate.gemspec rename to motion-pixatefreestyle.gemspec index 5d5060a..3a0c4a3 100644 --- a/motion-pixate.gemspec +++ b/motion-pixatefreestyle.gemspec @@ -2,13 +2,14 @@ Version = "2.1" Gem::Specification.new do |gem| - gem.name = "motion-pixate" + gem.name = "motion-pixatefreestyle" gem.version = Version gem.authors = ['Paul Colton', 'Shizuo Fujita'] gem.email = ['paul@pixate.com', 'watson1978@gmail.com'] - gem.description = 'Pixate integration for RubyMotion projects' - gem.summary = 'motion-pixate allows RubyMotion projects to easily embed the Pixate Framework.' - gem.homepage = 'https://github.com/Pixate/RubyMotion-Pixate' + gem.description = 'Pixate Freestyle integration for RubyMotion projects' + gem.summary = 'motion-pixatefreestyle allows RubyMotion projects to easily embed the Pixate Freestyle Framework.' + gem.homepage = 'https://github.com/Pixate/RubyMotion-PixateFreestyle' + gem.licenses = ["Apache-2.0"] files = [] files << 'README.md'