joe_utils 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 727b59c3ac3b8b4eff170a6a74d96610b5151594
4
- data.tar.gz: 507d272b0fbeb1fec3dc0760d289439864de4051
3
+ metadata.gz: aa4d8f07f99b5152860a4eaea1279e1b0bcb10af
4
+ data.tar.gz: cd2481097bd9c3e1a3e2b9fb3213d043522ec525
5
5
  SHA512:
6
- metadata.gz: ef4829fe2caf630973e8afbbc0d7954b18fdd418c0cd53df89d44c7092fc6ab1c4b5eeeb979a581f408befab5cbeedfff3d0b85fdf1283571be2f70205ce85fb
7
- data.tar.gz: 23303ed1c92267ecbeda142aea1902562cf7ce2265c33b83c8bf23a8c283d0b9d0bc68bd6912dee5b3bd533b73e084bf01a13983afa271a17bf671a4f7e13d50
6
+ metadata.gz: effbbefc73f79be9e001d0fe3ed868f3573971f50bb7f89583debd15047d1d535bad535ca9a4a3751fecf39c150c6ee2790764379d1f88f56075f329a058ba78
7
+ data.tar.gz: cb61dc7d60cdcbfe3783b29cc5e9eac8bd3da4423e917ad6839e10256b483bd70543a8462f5d42f498f212a0abadf81cf9442c657a17a2db31b756bac07e42ef
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ # Created by .gitignore support plugin (hsz.mobi)
2
+ .idea
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="CompilerConfiguration">
4
+ <option name="DEFAULT_COMPILER" value="Javac" />
5
+ <resourceExtensions />
6
+ <wildcardResourcePatterns>
7
+ <entry name="!?*.java" />
8
+ <entry name="!?*.form" />
9
+ <entry name="!?*.class" />
10
+ <entry name="!?*.groovy" />
11
+ <entry name="!?*.scala" />
12
+ <entry name="!?*.flex" />
13
+ <entry name="!?*.kt" />
14
+ <entry name="!?*.clj" />
15
+ </wildcardResourcePatterns>
16
+ <annotationProcessing>
17
+ <profile default="true" name="Default" enabled="false">
18
+ <processorPath useClasspath="true" />
19
+ </profile>
20
+ </annotationProcessing>
21
+ </component>
22
+ </project>
23
+
@@ -0,0 +1,3 @@
1
+ <component name="CopyrightManager">
2
+ <settings default="" />
3
+ </component>
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
data/.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="IdProvider" IDEtalkID="068A575A346E210E0B65612CDF9339A2" />
4
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" />
5
+ </project>
6
+
data/.idea/modules.xml ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/joe_utils.iml" filepath="$PROJECT_DIR$/.idea/joe_utils.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+
@@ -0,0 +1,5 @@
1
+ <component name="DependencyValidationManager">
2
+ <state>
3
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
+ </state>
5
+ </component>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
7
+
data/bin/gem_util.sh ADDED
@@ -0,0 +1,59 @@
1
+ #!/bin/sh
2
+
3
+ # Create a Ruby gem and push it to rubygems.org and update it locally
4
+
5
+ GEMSPEC_SUFFIX=".gemspec"
6
+
7
+ function usage
8
+ {
9
+ echo "usage: system_page [[[-p push] [-i install]] | [-h]]"
10
+ }
11
+
12
+ # checking options of the script and name of the gem to work with
13
+ while [ "$1" != "" ]; do
14
+ case $1 in
15
+ -i | --install ) INSTALL=1
16
+ ;;
17
+ -p | --push ) PUSH=1
18
+ ;;
19
+ -h | --help ) usage
20
+ ;;
21
+ -ip ) INSTALL=1
22
+ PUSH=1
23
+ ;;
24
+ * ) GEM_NAME=$1
25
+ esac
26
+ shift
27
+ done
28
+
29
+ # if the gem name has not been defined, print error message and exit
30
+ if [ -z "$GEM_NAME" ]; then
31
+ echo "You did not enter a gem name. Please include it as an argument to the script or hard code it as a variable in the script." >&2
32
+ exit 1
33
+ fi
34
+
35
+ # run the gem build and parse for the gem release filename
36
+ GEM_BUILD_NAME=$(gem build "$GEM_NAME$GEMSPEC_SUFFIX" | awk '/File/ {print $2}' -)
37
+
38
+ # if the build failed (i.e. no file name obtained above), print error message and exit
39
+ if [ -z "$GEM_BUILD_NAME" ]; then
40
+ echo "The gem build failed. Please confirm the gem name and try again." >&2
41
+ exit 1
42
+ else
43
+ echo "Built successful"
44
+ fi
45
+
46
+ # if above succeeded, then push to rubygems.org using the gem that was compiled
47
+ if [ "$PUSH" ]; then
48
+ echo "Pushing..."
49
+ gem push "$GEM_BUILD_NAME"
50
+ fi
51
+
52
+ # install it locally
53
+ if [ "$INSTALL" ]; then
54
+ echo "Installing..."
55
+ gem install "$GEM_BUILD_NAME"
56
+ jgem install "$GEM_BUILD_NAME"
57
+ fi
58
+
59
+ exit 0
Binary file
data/joe_utils.gemspec ADDED
@@ -0,0 +1,20 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'joe_utils'
3
+ s.version = '0.0.4'
4
+ s.executables = %w(gem_util.sh)
5
+
6
+ s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
7
+ s.authors = ['Josef Erneker']
8
+ s.date = %q{2014-12-26}
9
+ s.description = %q{Overall personal utils gem}
10
+ s.licenses = ['GPL-3.0']
11
+ s.email = %q{josef.erneker@gmail.com}
12
+ s.files = `git ls-files`.split($\)
13
+ s.test_files = s.files.grep(/^test_/)
14
+ s.homepage = %q{http://rubygems.org/gems/joeutils}
15
+ s.require_paths = ['lib']
16
+ s.rubygems_version = %q{1.6.2}
17
+ s.summary = %q{Utils for work with files, sockets etc.}
18
+ s.add_development_dependency %w(minitest), '~> 0'
19
+ end
20
+
@@ -0,0 +1,27 @@
1
+ # encoding: UTF-8
2
+
3
+ require 'json'
4
+
5
+ module ConfigHelper
6
+ def sort_json_file(address)
7
+ json_content = File.open(address, 'r') { |f| f.read }
8
+ hash = JSON.load(json_content)
9
+ structure = hash.sort_by { |key, _| key.to_s }
10
+ hash = {}
11
+ structure.each {|field| hash[field[0]] = field[1] }
12
+ File.open(address, 'w+') { |f| f.write(JSON.pretty_generate(hash)) }
13
+ puts 'File hash content has been sorted.'
14
+ end
15
+
16
+ def is_inside_string?()
17
+
18
+ end
19
+
20
+ def get_list_of_constants(file_content)
21
+ file_content.match()
22
+ end
23
+
24
+ def select_config_in_file(file_content, config_name)
25
+ file_content.match()
26
+ end
27
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joe_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Erneker
@@ -10,20 +10,6 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: '["zip", "fileutils"]'
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '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'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: '["minitest"]'
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -40,16 +26,29 @@ dependencies:
40
26
  version: '0'
41
27
  description: Overall personal utils gem
42
28
  email: josef.erneker@gmail.com
43
- executables: []
29
+ executables:
30
+ - gem_util.sh
44
31
  extensions: []
45
32
  extra_rdoc_files: []
46
33
  files:
34
+ - .gitignore
35
+ - .idea/compiler.xml
36
+ - .idea/copyright/profiles_settings.xml
37
+ - .idea/encodings.xml
38
+ - .idea/misc.xml
39
+ - .idea/modules.xml
40
+ - .idea/scopes/scope_settings.xml
41
+ - .idea/vcs.xml
47
42
  - Rakefile
43
+ - bin/gem_util.sh
44
+ - joe_utils-0.0.3.gem
45
+ - joe_utils.gemspec
48
46
  - lib/joe_utils.rb
47
+ - lib/joe_utils/Script.rb
48
+ - lib/joe_utils/config_helper.rb
49
49
  - lib/joe_utils/console_helper.rb
50
50
  - lib/joe_utils/files_helper.rb
51
51
  - lib/joe_utils/name_helper.rb
52
- - lib/joe_utils/script.rb
53
52
  - lib/joe_utils/script_editor_helper.rb
54
53
  - lib/joe_utils/script_renderer.rb
55
54
  - lib/joe_utils/socket_helper.rb
@@ -76,7 +75,6 @@ requirements: []
76
75
  rubyforge_project:
77
76
  rubygems_version: 2.4.5
78
77
  signing_key:
79
- specification_version: 3
78
+ specification_version: 4
80
79
  summary: Utils for work with files, sockets etc.
81
- test_files:
82
- - test/test_joe_utils.rb
80
+ test_files: []
File without changes