scripto 0.0.2 → 0.0.3

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: bd230249468a8975ef75cad139685d21a535842b
4
- data.tar.gz: f9c7c8a34a06b1892b2302a70dbf09ce8c6be066
3
+ metadata.gz: 682b3b4d477f4c653c2f4f28b650eeb539d7c7fd
4
+ data.tar.gz: 1b9e0f393c6d9666f6cb374ca2c485ca95272fc6
5
5
  SHA512:
6
- metadata.gz: 353e0017433d1a40c4a02c31543a174774f3261d70ec722af53703499f24e65a94cd7d024ef41de9479522865f70907c292e783f72f444b8fccf0831e3ae262c
7
- data.tar.gz: 22d9cae0e3a74b4aa41e410cd1cb9d6671481d58a61477e7c1af681311abd0c04db79365f025122b6b6fd92bed1aff37bfc2436e09d9bd42257527f99615fced
6
+ metadata.gz: 2780520e158ddcf2843a38361c1fd64a9d041c7c215901ad6fe95e5932c43acca75fbda8bf2af8bb6c3928b795e41edf46e2ef3e7cd913d758558d7d8428bcd2
7
+ data.tar.gz: de8a0e1eb329fddfe4ff9e86efc65ecbaacc2765c6bbaed3877492b5e58f97b5f89af5d9d5f719fd4743a5171c9c31632c52b2fc63311b460f692bcfb50f5f32
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1.0
5
+ - 2.2.0
6
+ - 2.3.0
7
+ - 2.4.0
data/README.md CHANGED
@@ -4,8 +4,10 @@ Scripto is a framework for writing command line applications. It fills in many o
4
4
 
5
5
  * **print to $stderr** - Colored banners and a verbose mode to make your scripts louder.
6
6
  * **file operations** - Mkdir, cp, mv, ln. These operations can take care of common edge cases, like creating the target directory before copying a file.
7
- * **csv** - Read and write CSV files from hashes, Structs, or OpenStructs.
8
7
  * **run commands** - Run external commands and raise errors on failure.
8
+ * **csv** - Read and write CSV files from hashes, Structs, or OpenStructs.
9
+
10
+ Rdoc at [rdoc.info](http://rdoc.info/github/gurgeous/scripto/). Thanks!
9
11
 
10
12
  ## Getting Started
11
13
 
@@ -55,7 +55,7 @@ module Scripto
55
55
  # directory had to be created. This is useful with verbose?, to get an
56
56
  # exact changelog.
57
57
  def mkdir_if_necessary(dir, owner: nil, mode: nil)
58
- if !(File.exists?(dir) || File.symlink?(dir))
58
+ if !(File.exist?(dir) || File.symlink?(dir))
59
59
  mkdir(dir, owner: owner, mode: mode)
60
60
  true
61
61
  end
@@ -65,7 +65,7 @@ module Scripto
65
65
  # true if the file had to be copied. This is useful with verbose?, to get
66
66
  # an exact changelog.
67
67
  def cp_if_necessary(src, dst, mkdir: false, owner: nil, mode: nil)
68
- if !(File.exists?(dst) && FileUtils.compare_file(src, dst))
68
+ if !(File.exist?(dst) && FileUtils.compare_file(src, dst))
69
69
  cp(src, dst, mkdir: mkdir, owner: owner, mode: mode)
70
70
  true
71
71
  end
@@ -90,7 +90,7 @@ module Scripto
90
90
  # Runs #rm, but ONLY if +file+ exists. Return true if the file had to be
91
91
  # removed. This is useful with verbose?, to get an exact changelog.
92
92
  def rm_if_necessary(file)
93
- if File.exists?(file)
93
+ if File.exist?(file)
94
94
  rm(file)
95
95
  true
96
96
  end
@@ -2,7 +2,7 @@ require "English"
2
2
  require "shellwords"
3
3
 
4
4
  module Scripto
5
- module RunCommands
5
+ module RunCommands
6
6
  # The error thrown by #run, #run_capture and #run_quietly on failure.
7
7
  class Error < StandardError
8
8
  end
@@ -1,4 +1,4 @@
1
1
  module Scripto
2
2
  # current Scripto version
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
@@ -61,7 +61,7 @@ class TestFile < Minitest::Test
61
61
 
62
62
  def test_rm
63
63
  Scripto.rm(SRC)
64
- assert(!File.exists?(SRC))
64
+ assert(!File.exist?(SRC))
65
65
  Scripto.rm("this_file_doesnt_exist") # shouldn't complain
66
66
  end
67
67
 
@@ -85,7 +85,7 @@ class TestRun < Minitest::Test
85
85
  protected
86
86
 
87
87
  def assert_cp(&block)
88
- File.unlink(DST) if File.exists?(DST)
88
+ File.unlink(DST) if File.exist?(DST)
89
89
  yield
90
90
  assert_equal(File.read(SRC), File.read(DST))
91
91
  File.unlink(DST)
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scripto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Doppelt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2017-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '5.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description:
@@ -59,7 +59,8 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
+ - ".travis.yml"
63
64
  - Gemfile
64
65
  - LICENSE.txt
65
66
  - README.md
@@ -91,17 +92,17 @@ require_paths:
91
92
  - lib
92
93
  required_ruby_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - '>='
95
+ - - ">="
95
96
  - !ruby/object:Gem::Version
96
97
  version: 2.0.0
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - '>='
100
+ - - ">="
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  requirements: []
103
104
  rubyforge_project:
104
- rubygems_version: 2.2.1
105
+ rubygems_version: 2.2.2
105
106
  signing_key:
106
107
  specification_version: 4
107
108
  summary: Helpers for writing command line scripts. An extraction from Dwellable.