qualiac_twine 0.0.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 21f802a964f9772ce95d372ba37aff39c9521afb58b0ea253205719362168f85
4
+ data.tar.gz: d3c0a6190db7b7760af563029d70aeb1620b7a5c2245c17ef3609a72abb2a2a5
5
+ SHA512:
6
+ metadata.gz: 4ace11bcda0918adfaa7c43f9b2e44736281d38b02c4654d4d9ce767e6f9a9c318524b67a7397723bc0bece1ba98fff54634bcdd79b490692639d1c9722a7600
7
+ data.tar.gz: aa77da2cfcf0b05f498765862b3c47ad2cc4058ab4f2682c2d6a1e889790c2ed87496afc7ff210a1c3c783b71c8bb4d537137ddd79e6e6bd9a352f29a955a30e
data/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ Software License Agreement (BSD License)
2
+
3
+ Copyright (c) 2012, Mobiata, LLC
4
+ All rights reserved.
5
+
6
+ Redistribution and use of this software in source and binary forms, with or
7
+ without modification, are permitted provided that the following conditions are
8
+ met:
9
+
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ * Neither the name of the organization nor the names of its contributors may be
18
+ used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
25
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # Qualiac Twine
2
+
@@ -0,0 +1 @@
1
+ require_relative 'qualiac_twine/qualiac_twine'
@@ -0,0 +1,65 @@
1
+ module Twine
2
+ module Formatters
3
+ class QKRStringSwift < Abstract
4
+ def format_name
5
+ 'qkr_string_swift'
6
+ end
7
+
8
+ def extension
9
+ '.swift'
10
+ end
11
+
12
+ def can_handle_directory?(path)
13
+ true
14
+ end
15
+
16
+ def default_file_name
17
+ 'QKRString+extension.swift'
18
+ end
19
+
20
+ def determine_language_given_path(path)
21
+ return @twine_file.language_codes[0]
22
+ end
23
+
24
+ def output_path_for_language(lang)
25
+ ""
26
+ end
27
+
28
+ def read(io, lang)
29
+ end
30
+
31
+ def format_header(lang)
32
+ "/**\n * Apple Strings File\n * Generated by Twine #{Twine::VERSION}\n */"
33
+ end
34
+
35
+ def format_sections(twine_file, lang)
36
+ result = "import Foundation\n"
37
+ result += "import QualiacApp\n\n"
38
+ result += "// swiftlint:disable identifier_name line_length superfluous_disable_command"
39
+ result += "extension QKRString {"
40
+
41
+ result += super + "\n"
42
+
43
+ result += "}"
44
+ end
45
+
46
+ def format_section_header(section)
47
+ "\t/********** #{section.name} **********/\n"
48
+ end
49
+
50
+ def key_value_pattern
51
+ "\tvar %{key}: String { return load(\"%{key}\", in: ExpenseReports.bundle, table: \"Localizable\") }\n"
52
+ end
53
+
54
+ def format_key(key)
55
+ escape_quotes(key)
56
+ end
57
+
58
+ def format_value(value)
59
+ escape_quotes(value)
60
+ end
61
+ end
62
+ end
63
+ end
64
+
65
+ Twine::Formatters.formatters << Twine::Formatters::Apple.new
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+ require 'twine'
3
+
4
+ require_relative 'formatter/qkr_string_swift'
5
+
6
+ Twine::Formatters.register_formatter Twine::Formatters::QKRStringSwift
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'qualiac_twine'
3
+ s.version = '0.0.0'
4
+ s.date = '2019-04-17'
5
+ s.description = s.summary = 'Qualiac plugin for twine'
6
+ s.description += '.' # avoid identical warning
7
+ s.authors = ["Damien DANGLARD"]
8
+ s.email = 'ddanglard@cegid.com'
9
+ s.homepage = 'http://rubygems.org/gems/qualiac_twine'
10
+ s.license = 'https://gitlab.com/qualiac/gem/qualiac-twine/blob/master/LICENSE'
11
+ s.require_paths = ['lib']
12
+
13
+ s.add_runtime_dependency 'twine', '~> 0.5.0'
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: qualiac_twine
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Damien DANGLARD
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-04-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: twine
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.5.0
27
+ description: Qualiac plugin for twine.
28
+ email: ddanglard@cegid.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE
34
+ - README.md
35
+ - lib/qualiac_twine.rb
36
+ - lib/qualiac_twine/formatter/qkr_string_swift.rb
37
+ - lib/qualiac_twine/qualiac_twine.rb
38
+ - qualiac_twine.gemspec
39
+ homepage: http://rubygems.org/gems/qualiac_twine
40
+ licenses:
41
+ - https://gitlab.com/qualiac/gem/qualiac-twine/blob/master/LICENSE
42
+ metadata: {}
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubygems_version: 3.0.1
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Qualiac plugin for twine
62
+ test_files: []