flavours 0.0.5 → 0.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 114e509b32662c162de75b86d8dc2bebe9c0d60a
4
- data.tar.gz: 9bdf076d9f6f133c5d125a898730ba0d1eaf579d
3
+ metadata.gz: edcd019cc082e2e4baf676a34e1d61ee9bf61969
4
+ data.tar.gz: 9850b6c15da1d8d722484c53c93ed89c27ef2664
5
5
  SHA512:
6
- metadata.gz: 05e29447d992a6ea264a3f8f047a6b45da8f96a2035f7b6a47b5939708a7261d3c509dfda6ca3781f789dec45348ebdea782cb747972d4b9d780fcff2a1bd108
7
- data.tar.gz: 377c43b96a2a529eaac9094cbc8819fd9dd39af3719366f63cb575efc1fee75f69322ec6101d98537238202d36e90a104a2e307e8303f6af0a921ed074bf5c63
6
+ metadata.gz: e7163dc4cc37e991f3947acd2169aee860d6be3283cc41e10d66505472355fe1e2ef5654088d6acff40d340abf46198634ba0a6f8a7b5bf5de34f9f5f191c062
7
+ data.tar.gz: 157a4f4bf6b7fa7cc9b392db0e0fd7a0c10665813d99b396ea7420e85c74fbed1ac7b5fcfb19c3963c3d261dd6f537109d0dcb7736a35b031753314236b4c64d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flavours (0.0.5)
4
+ flavours (0.0.7)
5
5
  bundler (~> 1.3)
6
6
  commander (~> 4.2)
7
7
  dotenv (~> 0.11)
data/README.md CHANGED
@@ -8,7 +8,7 @@ One codebase. Multiple Google Play Store submissions with different icons, XML r
8
8
 
9
9
  ```
10
10
  $ flavours install
11
- $ flavours shoot
11
+ $ flavours create
12
12
  ```
13
13
 
14
14
  **About**
@@ -25,7 +25,7 @@ Flavours requires your Android application use the Gradle build system.
25
25
 
26
26
  * [Installation](#installation)
27
27
  * [Set Up](#set-up)
28
- * [Formatting flavours.json](#formatting-flavours-json)
28
+ * [Formatting flavours.json](#formatting-flavoursjson)
29
29
  * [Creating Flavors](#creating-flavors)
30
30
  * [The Future](#the-future)
31
31
  * [Contributing](#contributing)
@@ -6,7 +6,7 @@ module Flavours
6
6
  end
7
7
 
8
8
  def self.assets_file_path directory, m, flavour_name
9
- return "#{directory}/#{m}/src/#{flavour_name}/res"
9
+ return "#{directory}/#{m}/src/#{flavour_name.gsub(/[^0-9a-z ]/i, '')}/res"
10
10
  end
11
11
 
12
12
  def self.file_path_with_folder_name directory, folder, m, flavour_name
@@ -10,7 +10,7 @@ module Flavours
10
10
  @flavour_string = ''
11
11
  flavours.each do |f|
12
12
  @flavour_string += gradle_string_for_flavour f
13
- Flavours::green " #{f['flavourName']}" unless $nolog
13
+ Flavours::green " #{f['flavourName'].gsub(/[^0-9a-z ]/i, '')}" unless $nolog
14
14
  Flavours::create_images directory, m, f
15
15
  Flavours::create_xml_resources directory, m, f
16
16
  puts
@@ -37,7 +37,7 @@ module Flavours
37
37
  def self.gradle_string_for_flavour flavour
38
38
  package = flavour['packageName'] ? " packageName \"#{flavour['packageName']}\"\n" : ''
39
39
  buildConfig = flavour['buildConfig'] ? build_config_string_for_flavour(flavour) : ''
40
- return " #{flavour['flavourName']} {\n#{package}#{buildConfig} }\n"
40
+ return " #{flavour['flavourName'].gsub(/[^0-9a-z ]/i, '')} {\n#{package}#{buildConfig} }\n"
41
41
  end
42
42
 
43
43
 
@@ -16,7 +16,7 @@ module Flavours
16
16
  end
17
17
 
18
18
  # Resize Icons
19
- resize_icons directory, m, flavour_hash
19
+ resize_icons directory, m, flavour_hash if flavour_hash['iconURL'] || flavour_hash['iconPath']
20
20
  end
21
21
 
22
22
 
@@ -26,9 +26,10 @@ module Flavours
26
26
  name = flavour_hash['flavourName']
27
27
 
28
28
  # Get Image Information
29
- img_path = ''
30
29
  if flavour_hash['iconUrl']
31
30
  img_path = self.path_for_downloaded_image_from_url directory, name, flavour_hash['iconUrl'], 'icons'
31
+ else
32
+ img_path = "#{directory}/#{flavour_hash['iconPath']}"
32
33
  end
33
34
 
34
35
  # Make Assets Directory
@@ -1,5 +1,5 @@
1
1
  module Flavours
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.7"
3
3
 
4
4
  def self.check_for_newer_version
5
5
  unless Gem.latest_version_for('flavours').to_s == VERSION
@@ -48,6 +48,6 @@ module Flavours
48
48
  # Resource String
49
49
  def self.res_string res, name, value, type
50
50
  type_string = type ? " type=\"#{type}\"" : ''
51
- return " <#{res} name=\"#{name}\"#{type_string}>#{value}</#{res}>\n"
51
+ return " <#{res} name=\"#{name}\"#{type_string}>#{value.sub("'", "\\'")}</#{res}>\n"
52
52
  end
53
53
  end
data/resources/banner.png CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flavours
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Gordon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler