Permalink
Browse files

[config] remove gap:plugins support

we went a different direction
  • Loading branch information...
alunny committed Mar 19, 2012
1 parent 5acf01b commit a2545e7f53e1980da733c2d0c2366a2515def58f
Showing with 1 addition and 46 deletions.
  1. +1 −15 lib/confetti/config.rb
  2. +0 −26 spec/config_spec.rb
  3. +0 −5 spec/fixtures/config.xml
View
@@ -14,7 +14,7 @@ class FiletypeError < Confetti::Error ; end
:height, :width, :plist_icon_set
attr_reader :author, :viewmodes, :name, :license, :content,
:icon_set, :feature_set, :preference_set, :xml_doc,
- :splash_set, :plist_icon_set, :plugin_set, :access_set
+ :splash_set, :plist_icon_set, :access_set
generate_and_write :android_manifest, :android_strings, :webos_appinfo,
:ios_info, :symbian_wrt_info, :blackberry_widgets_config,
@@ -40,7 +40,6 @@ def method_missing(method_name, *args)
Image = Class.new Struct.new(:src, :height, :width, :extras)
Feature = Class.new Struct.new(:name, :required)
Preference = Class.new Struct.new(:name, :value, :readonly)
- Plugin = Class.new Struct.new(:name, :value, :platforms)
Access = Class.new Struct.new(:origin, :subdomains)
def initialize(*args)
@@ -53,7 +52,6 @@ def initialize(*args)
@feature_set = TypedSet.new Feature
@splash_set = TypedSet.new Image
@preference_set = TypedSet.new Preference
- @plugin_set = TypedSet.new Plugin
@access_set = TypedSet.new Access
@viewmodes = []
@@ -121,10 +119,6 @@ def populate_from_xml(xml_file)
next if attr["src"].nil? or attr["src"].empty?
extras = grab_extras attr
@splash_set << Image.new(attr["src"], attr["height"], attr["width"], extras)
- when "plugin"
- plugin = Plugin.new(attr["name"], attr["value"])
- plugin.platforms = plugin_platforms(ele)
- @plugin_set << plugin
end
end
end
@@ -171,14 +165,6 @@ def preference name
pref && pref.value && pref.value.to_sym
end
- # retrieve the specified platforms as a list of lowercase symbols
- # extracted from children of ele
- def plugin_platforms ele
- ele.children.
- select { |e| e.respond_to?(:name) and e.name == "platform" }.
- map { |e| e.attributes["name"].downcase.to_sym }
- end
-
# mostly an internal method to help with weird cases
# in particular #phonegap_version
def preference_obj name
View
@@ -346,32 +346,6 @@
end
end
- describe "plugins" do
- it "should append plugins to the plugin set" do
- @config.plugin_set.size.should be 1
- end
-
- describe "created object" do
- before do
- @plugin = @config.plugin_set.first
- end
-
- it "should have the right name" do
- @plugin.name.should == "ChildBrowser"
- end
-
- it "should have the right value" do
- package = "com.phonegap.plugins.childBrowser.ChildBrowser"
- @plugin.value.should == package
- end
-
- it "should have the right platforms" do
- @plugin.platforms.size.should be 1
- @plugin.platforms.first.should be :android
- end
- end
- end
-
describe "access" do
it "should append tags to the access set" do
@config.access_set.size.should be 2
View
@@ -50,9 +50,4 @@ THE SOFTWARE.</license>
<access origin="http://foo.phonegap.com" />
<access origin="http://bar.phonegap.com" subdomains="false" />
-
- <gap:plugin name="ChildBrowser"
- value="com.phonegap.plugins.childBrowser.ChildBrowser">
- <platform name="android" />
- </gap:plugin>
</widget>

0 comments on commit a2545e7

Please sign in to comment.