PackingPeanut 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/PackingPeanut-android/PackingPeanut.rb +15 -0
- data/lib/PackingPeanut-ios/PackingPeanut.rb +7 -0
- data/lib/PackingPeanut.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94e10d22d54e95b23ebddea1a122ae414a44ecd
|
4
|
+
data.tar.gz: 17489485784da059bbb569b9139475cfbef1d57c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 408339bba5c5d229c136a61c72d151c47a2e2bb65584a5c83cd15383cd7fbc498940407ccf893a8a3e721edaa1e474af5913adc67b6c43fea12e5c9cc922f266
|
7
|
+
data.tar.gz: 3600ca83f68146068230a70d1d71394921e752ec490af3fcebd590a2efa72222bdda3fc97878931a91238a9e25e864cc49ead18791098103229c8f8801c28582
|
@@ -81,6 +81,21 @@ module PackingPeanut
|
|
81
81
|
merged_hashes
|
82
82
|
end
|
83
83
|
|
84
|
+
def delete(key)
|
85
|
+
settings = get_settings
|
86
|
+
string_key = key.to_s
|
87
|
+
editor = settings.edit
|
88
|
+
editor.remove(string_key)
|
89
|
+
editor.commit
|
90
|
+
end
|
91
|
+
|
92
|
+
def delete_all!
|
93
|
+
settings = get_settings
|
94
|
+
editor = settings.edit
|
95
|
+
editor.clear()
|
96
|
+
editor.commit
|
97
|
+
end
|
98
|
+
|
84
99
|
def get_settings
|
85
100
|
raise "[PackingPeanut] Fatal Error - You must set the context before accessing persistent data." unless @context
|
86
101
|
current_context.getSharedPreferences(storage_file, preference_mode)
|
data/lib/PackingPeanut.rb
CHANGED
@@ -5,7 +5,7 @@ end
|
|
5
5
|
|
6
6
|
# WHAT ARE WE?
|
7
7
|
platform = Motion::Project::App.respond_to?(:template) ? Motion::Project::App.template : :ios
|
8
|
-
if platform.to_s.start_with?('ios')
|
8
|
+
if platform.to_s.start_with?('ios') or platform.to_s.start_with?('osx')
|
9
9
|
platform_name = 'ios'
|
10
10
|
elsif platform.to_s.start_with?('android')
|
11
11
|
platform_name = 'android'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: PackingPeanut
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gant
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|