kanrisuru 0.10.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +9 -9
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +7 -8
  4. data/.rspec +1 -1
  5. data/CHANGELOG.md +127 -102
  6. data/CODE_OF_CONDUCT.md +10 -10
  7. data/README.md +19 -90
  8. data/kanrisuru.gemspec +2 -1
  9. data/lib/kanrisuru/command.rb +7 -0
  10. data/lib/kanrisuru/core/archive.rb +11 -35
  11. data/lib/kanrisuru/core/disk.rb +0 -3
  12. data/lib/kanrisuru/core/dmi.rb +1 -1
  13. data/lib/kanrisuru/core/file.rb +4 -11
  14. data/lib/kanrisuru/core/find.rb +6 -11
  15. data/lib/kanrisuru/core/mount.rb +14 -15
  16. data/lib/kanrisuru/core/socket.rb +2 -1
  17. data/lib/kanrisuru/core/stream.rb +1 -2
  18. data/lib/kanrisuru/core/zypper.rb +6 -23
  19. data/lib/kanrisuru/os_package/collection.rb +58 -0
  20. data/lib/kanrisuru/os_package/define.rb +34 -0
  21. data/lib/kanrisuru/os_package/include.rb +163 -0
  22. data/lib/kanrisuru/os_package.rb +3 -245
  23. data/lib/kanrisuru/remote/cpu.rb +5 -1
  24. data/lib/kanrisuru/remote/fstab.rb +5 -5
  25. data/lib/kanrisuru/result.rb +5 -4
  26. data/lib/kanrisuru/util.rb +1 -1
  27. data/lib/kanrisuru/version.rb +1 -1
  28. data/spec/functional/core/apt_spec.rb +22 -30
  29. data/spec/functional/core/archive_spec.rb +96 -120
  30. data/spec/functional/core/find_spec.rb +94 -113
  31. data/spec/functional/core/mount_spec.rb +121 -0
  32. data/spec/functional/core/socket_spec.rb +23 -28
  33. data/spec/functional/core/stream_spec.rb +12 -12
  34. data/spec/functional/core/transfer_spec.rb +108 -131
  35. data/spec/functional/core/yum_spec.rb +58 -83
  36. data/spec/functional/remote/cluster_spec.rb +11 -2
  37. data/spec/functional/remote/cpu_spec.rb +104 -0
  38. data/spec/functional/remote/env_spec.rb +3 -5
  39. data/spec/helper/stub_network.rb +35 -16
  40. data/spec/helper/test_hosts.rb +11 -1
  41. data/spec/integration/core/apt_spec.rb +2 -3
  42. data/spec/integration/core/archive_spec.rb +8 -13
  43. data/spec/integration/core/disk_spec.rb +2 -3
  44. data/spec/integration/core/dmi_spec.rb +2 -3
  45. data/spec/integration/core/file_spec.rb +4 -14
  46. data/spec/integration/core/find_spec.rb +3 -3
  47. data/spec/integration/core/group_spec.rb +2 -3
  48. data/spec/integration/core/ip_spec.rb +2 -3
  49. data/spec/integration/core/path_spec.rb +2 -3
  50. data/spec/integration/core/socket_spec.rb +2 -4
  51. data/spec/integration/core/stat_spec.rb +2 -3
  52. data/spec/integration/core/stream_spec.rb +6 -9
  53. data/spec/integration/core/system_spec.rb +2 -4
  54. data/spec/integration/core/transfer_spec.rb +4 -9
  55. data/spec/integration/core/user_spec.rb +2 -4
  56. data/spec/integration/core/yum_spec.rb +2 -3
  57. data/spec/integration/core/zypper_spec.rb +5 -6
  58. data/spec/integration/remote/cpu_spec.rb +2 -3
  59. data/spec/integration/remote/env_spec.rb +2 -3
  60. data/spec/integration/remote/fstab_spec.rb +2 -3
  61. data/spec/integration/remote/host_spec.rb +2 -3
  62. data/spec/integration/remote/memory_spec.rb +2 -2
  63. data/spec/integration/remote/os_spec.rb +2 -3
  64. data/spec/integration/remote/remote_file_spec.rb +9 -15
  65. data/spec/spec_helper.rb +12 -3
  66. data/spec/unit/command_spec.rb +19 -1
  67. data/spec/unit/core/find_spec.rb +1 -1
  68. data/spec/unit/core/yum_spec.rb +1 -1
  69. data/spec/unit/mode_spec.rb +2 -2
  70. data/spec/unit/remote/cluster_spec.rb +3 -1
  71. data/spec/unit/remote/cpu_spec.rb +1 -2
  72. data/spec/unit/remote/env_spec.rb +1 -3
  73. data/spec/unit/util_spec.rb +13 -0
  74. metadata +23 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40303a0de6eed7d5c10708a31ebf33ee7aed8701a21b3118e9bad5cdc751376b
4
- data.tar.gz: 9daec56c51d0a4d6929fbcbbb585744215a61d877993e67453899ccf2db81717
3
+ metadata.gz: c96681bd051bc264f5433c668dee375c164232f3a417048789a5ae843118cebe
4
+ data.tar.gz: ba00a05d965d89c442e7d7c316899dd29fcfdfaa24ac44497fa7aa20eac359e3
5
5
  SHA512:
6
- metadata.gz: 11a75804f677a0b72c88ab944c475646eebe68ed64a1fed15acb349e423215f98ddfcdd626681867eee82bb9092cd349ead6f7a44da142937bf329f300a877b0
7
- data.tar.gz: 2605bbf322b06ae28d49d25b7d65970d5e5632527b79e12c6c7d2988173602ed126eab6d263106d866bda146153513573f702e210a36b4a3ee0e812caae06c79
6
+ metadata.gz: b4cd7a7ff5f45ce2d498b16f4b7c65d87e961956fb7139034d908547b638fe8aa060f4dfa5c1bd6cacc05c2a250ab10f0c93126679cd2b628bf67020c17829fe
7
+ data.tar.gz: '01837cd7224fcb08a9497d3f60ebd00b71d62d5c47db81af976b39f4fdef87ed60e0abd07b3f6d39dacbdf089c0874dc75c8c3eebc94ce4468a3f1766f170ba2'
@@ -2,16 +2,16 @@
2
2
  Thank you for your interest in contributing to the Kanrisuru project. We appreciate any volunteers that want to help improve, grow and sustain the Kanrisuru code base!
3
3
 
4
4
  ## Submitting a bug
5
- * Do not open up a GitHub issue if the bug is a security vulnerability with the Kanrisuru project, instead send an email to engineeering@avamia.com for any security realted issues.
6
- * Check if there's already an existing issue before submitting a [similar one](https://github.com/avamia/kanrisuru/issues).
7
- * If you can't find a similar issue [open a new one](https://github.com/avamia/kanrisuru/issues/new?assignees=&labels=&template=bug_report.md). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
5
+ * Do not open up a GitHub issue if the bug is a security vulnerability with the Kanrisuru project, instead send an email to engineeering@avamia.com for any security realted issues.
6
+ * Check if there's already an existing issue before submitting a [similar one](https://github.com/avamia/kanrisuru/issues).
7
+ * If you can't find a similar issue [open a new one](https://github.com/avamia/kanrisuru/issues/new?assignees=&labels=&template=bug_report.md). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
8
8
 
9
9
  ## Adding a core feature
10
- * We always welcome improving the core Kanrisuru project. If we are missing a core command available on most linux distros, this would be a place to add that type of functionality.
11
- * Other ideas like performance optimization, additional testing, and ease of use are great ways of improving the project.
12
- * If you want to create something outside of the core project, see the next section.
10
+ * We always welcome improving the core Kanrisuru project. If we are missing a core command available on most linux distros, this would be a place to add that type of functionality.
11
+ * Other ideas like performance optimization, additional testing, and ease of use are great ways of improving the project.
12
+ * If you want to create something outside of the core project, see the next section.
13
13
 
14
14
  ## Adding a new module
15
- * If you want to extent Kanrisuru beyond the underlying system code base or core module packages, the best way is to create a new gem, in the format of `kanrisuru-package`.
16
- * This helps keep the core Kanrisuru package from too much bloat.
17
- * See our developer module section to see how to build a new Kanrisuru module.
15
+ * If you want to extent Kanrisuru beyond the underlying system code base or core module packages, the best way is to create a new gem, in the format of `kanrisuru-package`.
16
+ * This helps keep the core Kanrisuru package from too much bloat.
17
+ * See our developer module section to see how to build a new Kanrisuru module.
@@ -12,10 +12,10 @@ A clear and concise description of what the bug is.
12
12
 
13
13
  **To Reproduce**
14
14
  Steps to reproduce the behavior:
15
- 1. Go to '...'
16
- 2. Click on '....'
17
- 3. Scroll down to '....'
18
- 4. See error
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
19
 
20
20
  **Expected behavior**
21
21
  A clear and concise description of what you expected to happen.
@@ -24,10 +24,9 @@ A clear and concise description of what you expected to happen.
24
24
  If applicable, add screenshots to help explain your problem.
25
25
 
26
26
  **Desktop (please complete the following information):**
27
- - OS: [e.g. Ubuntu]
28
- - Version [e.g. 22]
29
- - Ruby version: [e.g 2.7.4]
30
-
27
+ - OS: [e.g. Ubuntu]
28
+ - Version [e.g. 22]
29
+ - Ruby version: [e.g 2.7.4]
31
30
 
32
31
  **Additional context**
33
32
  Add any other context about the problem here.
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
- --format documentation
1
+ --format progress
2
2
  --color
3
3
  --require spec_helper
data/CHANGELOG.md CHANGED
@@ -1,114 +1,140 @@
1
+ ## Kanrisuru 0.12.1 (December 05, 2021) ##
2
+ * Fix typo in spec.
3
+ * Cleanup bad code style.
4
+
5
+ ## Kanrisuru 0.12.0 (December 05, 2021) ##
6
+ * Add functional test cases for `mount` command.
7
+ * Fix typos and command preperation for `mount` command.
8
+ * Refactor `os_package` module into smaller modules for `Kanrisuru::OsPackage::Collection`, `Kanrisuru::OsPackage::Define`, and `Kanrisuru::OsPackage::Include`.
9
+ * Add `append_array` to `command` class for easy string to array conversion for variable option passing.
10
+ * Cleanup bad coding styles.
11
+ * Add parallel testing support for long running integration tests on remote servers.
12
+ * Refactor specs to use variable spec_dir path for parallel testing on remote hosts with possible overwriting at the same time.
13
+
14
+ ## Kanrisuru 0.11.1 (December 04, 2021) ##
15
+ * Cleanup self-assignment branches
16
+ * Fix linting issues.
17
+
18
+ ## Kanrisuru 0.11.0 (December 04, 2021) ##
19
+ * Add codequality badge, cleanup code linting issues.
20
+ * Fix `fstab` issue with blkid device return type.
21
+ * Fix `find` spec with sudo permissions.
22
+ * Change `stub_network` result override to use `block.call` with a conditional check for indvidual command stubs.
23
+ * Add `architecture` method to `cpu`.
24
+ * Add functional test cases for `cpu` class.
25
+ * Add more unit test cases.
26
+
1
27
  ## Kanrisuru 0.10.0 (December 03, 2021) ##
2
- * Add `stub_command` and `unstub_command` to mock indvidual command results from a remote server.
3
- * Add `count` and `delete` to `Kanrisuru::Remote::Env` class for managing environment variables.
4
- * Add unit and functional test cases for `Kanrisuru::Remote::Env`.
5
- * Add functional test cases for the `archive` command.
6
- * Fix typo bugs in the `archive` command. Fix `--exclude` opt field in `archive` command.
7
- * Add unit test cases for `Kanrisuru::Mode` class.
28
+ * Add `stub_command` and `unstub_command` to mock indvidual command results from a remote server.
29
+ * Add `count` and `delete` to `Kanrisuru::Remote::Env` class for managing environment variables.
30
+ * Add unit and functional test cases for `Kanrisuru::Remote::Env`.
31
+ * Add functional test cases for the `archive` command.
32
+ * Fix typo bugs in the `archive` command. Fix `--exclude` opt field in `archive` command.
33
+ * Add unit test cases for `Kanrisuru::Mode` class.
8
34
 
9
35
  ## Kanrisuru 0.9.2 (November 30, 2021) ##
10
- * Add unit test cases for all core commands.
11
- * Add unit test cases for `cluster` class.
12
- * Add codecov xml output for coverage badge.
36
+ * Add unit test cases for all core commands.
37
+ * Add unit test cases for `cluster` class.
38
+ * Add codecov xml output for coverage badge.
13
39
 
14
40
  ## Kanrisuru 0.9.1 (November 29, 2021) ##
15
- * Fix type on `address_sizes` for `Kanrisuru::Remote::Cpu` class.
16
- * Add unit test cases for the `cpu` class.
41
+ * Fix type on `address_sizes` for `Kanrisuru::Remote::Cpu` class.
42
+ * Add unit test cases for the `cpu` class.
17
43
 
18
44
  ## Kanrisuru 0.9.0 (November 23, 2021) ##
19
- * Add `delete` to `Kanrisuru::Remote::Cluster` class to allow removal of hosts from cluster.
20
- * Add functional test cases for remote cluster class.
45
+ * Add `delete` to `Kanrisuru::Remote::Cluster` class to allow removal of hosts from cluster.
46
+ * Add functional test cases for remote cluster class.
21
47
 
22
48
  ## Kanrisuru 0.8.23 (November 19, 2021) ##
23
- * Add functional test cases for `yum` command
24
- * Add stub by operating system method, with support for `ubuntu` and `centos` os types.
25
- * Fix `ArgumentError` typo in yum commands, `erase` and `remove`.
49
+ * Add functional test cases for `yum` command
50
+ * Add stub by operating system method, with support for `ubuntu` and `centos` os types.
51
+ * Fix `ArgumentError` typo in yum commands, `erase` and `remove`.
26
52
 
27
53
  ## Kanrisuru 0.8.22 (November 18, 2021) ##
28
- * Add functional test cases for `apt` command
54
+ * Add functional test cases for `apt` command
29
55
 
30
56
  ## Kanrisuru 0.8.21 (November 15, 2021) ##
31
- * Fix bug with `Kanrisuru::Mode` class, lookup table had incorrect value for execute only symbolic to numeric field.
57
+ * Fix bug with `Kanrisuru::Mode` class, lookup table had incorrect value for execute only symbolic to numeric field.
32
58
 
33
59
  ## Kanrisuru 0.8.20 (November 13, 2021) ##
34
- * Unstub network requests for full rspec test-suite run
60
+ * Unstub network requests for full rspec test-suite run
35
61
 
36
62
  ## Kanrisuru 0.8.19 (October 31, 2021) ##
37
- * Add functional test cases for `ss` command.
38
- * Enforce contraints on `family` parameter for `ss` command.
39
- * Deprecating `string_join_array` in favor of `array_join_string`. Both methods do the same thing, and the `array_join_string` has a better nameing interface; will be removed in the next major release.
40
- * Replace `string_join_array` method calls in `apt`, `transfer`, `yum`, and `zypper` with `array_join_string`.
63
+ * Add functional test cases for `ss` command.
64
+ * Enforce contraints on `family` parameter for `ss` command.
65
+ * Deprecating `string_join_array` in favor of `array_join_string`. Both methods do the same thing, and the `array_join_string` has a better nameing interface; will be removed in the next major release.
66
+ * Replace `string_join_array` method calls in `apt`, `transfer`, `yum`, and `zypper` with `array_join_string`.
41
67
 
42
68
  ## Kanrisuru 0.8.18 (October 19, 2021) ##
43
- * Add functional test cases for `find` commmand.
44
- * Add `regex_type` option for `find` command.
45
- * Fix bug with `size` option when using number in a string format, regex testing has been simplified on matching correctness for size with options like `100`, `+100`, `-100M` for comparitive fields.
69
+ * Add functional test cases for `find` commmand.
70
+ * Add `regex_type` option for `find` command.
71
+ * Fix bug with `size` option when using number in a string format, regex testing has been simplified on matching correctness for size with options like `100`, `+100`, `-100M` for comparitive fields.
46
72
 
47
73
  ## Kanrisuru 0.8.17 (October 16, 2021) ##
48
- * Add functional test cases for `transfer` module
49
- * Update wget command to accept hash for `headers` opt.
74
+ * Add functional test cases for `transfer` module
75
+ * Update wget command to accept hash for `headers` opt.
50
76
 
51
77
  ## Kanrisuru 0.8.16 (October 14, 2021) ##
52
- * Add functional test cases for `stream` and `path` modules
53
- * Create `expect_command` helper for quick testing on raw command result
78
+ * Add functional test cases for `stream` and `path` modules
79
+ * Create `expect_command` helper for quick testing on raw command result
54
80
 
55
81
  ## Kanrisuru 0.8.15 (October 12, 20201) ##
56
- * Move functional specs to integration. Anything that performs an actual network request will be under the integrations test.
57
- * Create a `StubNetwork` to quickly monkey patch the `Kanrisuru::Remote::Host` to simulate a `Net::SSH` channel request. Will add additional functionality for different simulations later on.
58
- * Start with testing the `stat` command as a functional test.
82
+ * Move functional specs to integration. Anything that performs an actual network request will be under the integrations test.
83
+ * Create a `StubNetwork` to quickly monkey patch the `Kanrisuru::Remote::Host` to simulate a `Net::SSH` channel request. Will add additional functionality for different simulations later on.
84
+ * Start with testing the `stat` command as a functional test.
59
85
 
60
86
  ## Kanrisuru 0.8.14 (October 8, 20201) ##
61
- * Update `Kanrisuru::Remote::Cluster` instantiation method to use array splat instead of passing array directly.
87
+ * Update `Kanrisuru::Remote::Cluster` instantiation method to use array splat instead of passing array directly.
62
88
 
63
89
  ## Kanrisuru 0.8.13 (October 4, 20201) ##
64
- * Fix `wc` command. Ensure result parsing is cast to integer values.
90
+ * Fix `wc` command. Ensure result parsing is cast to integer values.
65
91
 
66
92
  ## Kanrisuru 0.8.12 (October 4, 20201) ##
67
- * Refactor `rmdir` command to only work on empty directories.
93
+ * Refactor `rmdir` command to only work on empty directories.
68
94
 
69
95
  ## Kanrisuru 0.8.11 (October 1, 20201) ##
70
- * Allow `Kanrisuru::Mode` as mode type option in mkdir method.
96
+ * Allow `Kanrisuru::Mode` as mode type option in mkdir method.
71
97
 
72
98
  ## Kanrisuru 0.8.10 (August 24, 20201) ##
73
- * Fix bug with rspec test case.
99
+ * Fix bug with rspec test case.
74
100
 
75
101
  ## Kanrisuru 0.8.9 (August 24, 2021) ##
76
- * Fix spelling error exception `ArgumentError` in `Kanrisuru::Mode` class.
102
+ * Fix spelling error exception `ArgumentError` in `Kanrisuru::Mode` class.
77
103
 
78
104
  ## Kanrisuru 0.8.8 (August 21, 2021) ##
79
- * Add shorthand notation for tar command actions, such as `x` for `extract`, `t` for `list`, and `c` for `create`.
105
+ * Add shorthand notation for tar command actions, such as `x` for `extract`, `t` for `list`, and `c` for `create`.
80
106
 
81
107
  ## Kanrisuru 0.8.7 (August 21, 2021) ##
82
- * Fix `FileInfo` field for ls command. Was set to `memory_blocks`, but was incorrect, corrected this to `hard_links`.
108
+ * Fix `FileInfo` field for ls command. Was set to `memory_blocks`, but was incorrect, corrected this to `hard_links`.
83
109
 
84
110
  ## Kanrisuru 0.8.6 (August 21, 2021) ##
85
- * Add `minimum_io_size`, `physical_sector_size`, and `logical_sector_size` to the blkid low level disk probe for devices.
111
+ * Add `minimum_io_size`, `physical_sector_size`, and `logical_sector_size` to the blkid low level disk probe for devices.
86
112
 
87
113
  ## Kanrisuru 0.8.5 (August 20, 2021) ##
88
- * Add `summarize` option to `du` command. This will only output a total disk usage size for the entire directory versus disk usage for each file individually.
114
+ * Add `summarize` option to `du` command. This will only output a total disk usage size for the entire directory versus disk usage for each file individually.
89
115
 
90
116
  ## Kanrisuru 0.8.4 (August 20, 2021) ##
91
- * Convert `fsize` field to an `integer` for du disk module command.
117
+ * Convert `fsize` field to an `integer` for du disk module command.
92
118
 
93
119
  ## Kanrisuru 0.8.3 (August 20, 2021) ##
94
- * Fix bug with disk usage, `du` command by escaping the awk variables in the command.
95
- * Update `du` command to execute with shell user.
120
+ * Fix bug with disk usage, `du` command by escaping the awk variables in the command.
121
+ * Update `du` command to execute with shell user.
96
122
 
97
123
  ## Kanrisuru 0.8.2 (August 19, 2021) ##
98
- * Convert `major` and `minor` device field values to an `integer` in lsblk disk module.
124
+ * Convert `major` and `minor` device field values to an `integer` in lsblk disk module.
99
125
 
100
126
  ## Kanrisuru 0.8.1 (August 19, 2021) ##
101
- * Fix `nodeps` flag value for `lsblk` command in disk module.
127
+ * Fix `nodeps` flag value for `lsblk` command in disk module.
102
128
 
103
129
  ## Kanrisuru 0.8.0 (August 18, 2021) ##
104
- * Add last / lastb implementation in system core module.
130
+ * Add last / lastb implementation in system core module.
105
131
 
106
132
  ## Kanrisuru 0.7.3 (August 9, 2021) ##
107
- * Fixed bug with zypper remove package, where the package names weren't being added to the linux command.
108
- * Test case added to ensure package is removed.
133
+ * Fixed bug with zypper remove package, where the package names weren't being added to the linux command.
134
+ * Test case added to ensure package is removed.
109
135
 
110
136
  ## Kanrisuru 0.7.2 (August 9, 2021) ##
111
- * Fixed bug with the `os_method_cache` instance variable set in the namespaced instance of a host. This was causing collision issues inbetween host instances, where, hosts with the same aliased method name was getting overwritten (with a different OS), since the namespace instance variable existing on the host class definition wasn't getting reset inbetween host instantiations. Given that the `os_method_cache` is normally re-instantiated, this bug fix addresses this so that the `os_method_cache` is always defined on the host instance, ie:
137
+ * Fixed bug with the `os_method_cache` instance variable set in the namespaced instance of a host. This was causing collision issues inbetween host instances, where, hosts with the same aliased method name was getting overwritten (with a different OS), since the namespace instance variable existing on the host class definition wasn't getting reset inbetween host instantiations. Given that the `os_method_cache` is normally re-instantiated, this bug fix addresses this so that the `os_method_cache` is always defined on the host instance, ie:
112
138
 
113
139
  ```ruby
114
140
  host.instance_variable_get(:@os_method_cache)
@@ -117,101 +143,100 @@
117
143
  This is done instead of being saved on the namespace module. With the previous bug fix of using namespaced keys, there's no way for a method to be overwritten otherwise with a global `os_method_cache`.
118
144
 
119
145
  ## Kanrisuru 0.7.1 (August 8, 2021) ##
120
- * Fix bug with `os_include` when caching namespace unbound methods, use the namespace in the
146
+ * Fix bug with `os_include` when caching namespace unbound methods, use the namespace in the
121
147
  cache key to avoid any namespace collisions with the same method name, namely:
122
148
  ```ruby
123
149
  "#{namespace}.#{method_name}"
124
150
  ```
125
151
 
126
152
  ## Kanrisuru 0.7.0 (August 8, 2021) ##
127
- * Simplify `FileInfo` struct for return object of `ls` command.
128
- * Rename `size` to `fsize` for the `OpenFile` struct to avoid method naming conflicts of the struct class.
129
- * Allow `os_include` and `os_collection` to define multiple groupings of methods with the same namespace.
130
- * Add `clear` method for remote env class, to remove any session based env variables.
131
- * Add `to_s` method to result for quick analysis of string based return values.
132
- * Remove duplicate `numeric` method in the utils module.
153
+ * Simplify `FileInfo` struct for return object of `ls` command.
154
+ * Rename `size` to `fsize` for the `OpenFile` struct to avoid method naming conflicts of the struct class.
155
+ * Allow `os_include` and `os_collection` to define multiple groupings of methods with the same namespace.
156
+ * Add `clear` method for remote env class, to remove any session based env variables.
157
+ * Add `to_s` method to result for quick analysis of string based return values.
158
+ * Remove duplicate `numeric` method in the utils module.
133
159
 
134
160
  ## Kanrisuru 0.6.0 (August 1, 2021) ##
135
- * Add `lsof` implementation in system core module
136
- * Fix changelog formatting
137
- * Add changelog url to gemspec
161
+ * Add `lsof` implementation in system core module
162
+ * Fix changelog formatting
163
+ * Add changelog url to gemspec
138
164
 
139
165
  ## Kanrisuru 0.5.2 (July 30, 2021) ##
140
- * Add changelog documentation
141
- * Update documentation table with new tested core module
142
- * Deprecating `cpu_info` with replacement of `lscpu`. `cpu_info` will be removed in the next major release.
166
+ * Add changelog documentation
167
+ * Update documentation table with new tested core module
168
+ * Deprecating `cpu_info` with replacement of `lscpu`. `cpu_info` will be removed in the next major release.
143
169
 
144
170
  ## Kanrisuru 0.5.1 (July 29, 2021) ##
145
- * Unit test cases for core module structs, constants and types.
171
+ * Unit test cases for core module structs, constants and types.
146
172
 
147
173
  ## Kanrisuru 0.5.0 (July 29, 2021) ##
148
- * Add `zypper` package manager core module
149
- * Add `dmi` core module. Support for getting hardware information from virtual and physical machines.
150
- * Add only options for test_hosts to filter on which hosts to use for function style test cases. This is used within a test case and takes priority over command line `HOSTS=` and `EXCLUDE=` env variables.
151
- * Add additional bit conversion string handling in the util module, such as kib, mib, and gib.
152
- * Remove redudant namespacing in struct names, such as
174
+ * Add `zypper` package manager core module
175
+ * Add `dmi` core module. Support for getting hardware information from virtual and physical machines.
176
+ * Add only options for test_hosts to filter on which hosts to use for function style test cases. This is used within a test case and takes priority over command line `HOSTS=` and `EXCLUDE=` env variables.
177
+ * Add additional bit conversion string handling in the util module, such as kib, mib, and gib.
178
+ * Remove redudant namespacing in struct names, such as
153
179
  `Kanrisuru::Core::Yum::YumPackageOverview`, to `Kanrisuru::Core::Yum::PackageOverview`.
154
- * Fix backups test case for `cp` command with the correct filename.
155
- * Use 0755 as expected numeric mode for all OS functional tests in the `mkdir` test case.
156
- * Fix bug with `lscpu` regex match on cpus with more than 9 cores, ie `/cpu\d/` to `/cpu\d+/`
180
+ * Fix backups test case for `cp` command with the correct filename.
181
+ * Use 0755 as expected numeric mode for all OS functional tests in the `mkdir` test case.
182
+ * Fix bug with `lscpu` regex match on cpus with more than 9 cores, ie `/cpu\d/` to `/cpu\d+/`
157
183
 
158
184
 
159
185
  ## Kanrisuru 0.4.1 (July 26, 2021) ##
160
- * Add `kernel_statistics` to system core module.
186
+ * Add `kernel_statistics` to system core module.
161
187
 
162
188
  ## Kanrisuru 0.4.0 (July 25, 2021) ##
163
- * Update internal exit code of command from 0, to array of accpeted exit codes, with 0 being the default value.
164
- * Add `append_exit_code` to command, allowing additional exit codes to be considered true for `success?` return value.
165
- * Add `@port` to `Net::SSH.start` method
166
- * Fix test case with `host.os` return value of `opensuse_leap`.
167
- * Add `cpu_flags` method to `cpu` module
189
+ * Update internal exit code of command from 0, to array of accpeted exit codes, with 0 being the default value.
190
+ * Add `append_exit_code` to command, allowing additional exit codes to be considered true for `success?` return value.
191
+ * Add `@port` to `Net::SSH.start` method
192
+ * Fix test case with `host.os` return value of `opensuse_leap`.
193
+ * Add `cpu_flags` method to `cpu` module
168
194
 
169
195
  ## Kanrisuru 0.3.2 (July 23, 2021) ##
170
- * Fix typo from `key` to `signal` in hash fetch method.
196
+ * Fix typo from `key` to `signal` in hash fetch method.
171
197
 
172
198
  ## Kanrisuru 0.3.1 (July 22, 2021) ##
173
- * Add additional methods to `cpu` pulling from `lscpu` struct.
174
- * Fix `address_size` in `cpu` method call.
199
+ * Add additional methods to `cpu` pulling from `lscpu` struct.
200
+ * Fix `address_size` in `cpu` method call.
175
201
 
176
202
  ## Kanrisuru 0.3.0 (July 22, 2021) ##
177
- * Add `lscpu` system core module
178
- * Replace `cpu` module internal fetching of data from `cpu_info` to `lscpu` struct.
203
+ * Add `lscpu` system core module
204
+ * Replace `cpu` module internal fetching of data from `cpu_info` to `lscpu` struct.
179
205
 
180
206
  ## Kanrisuru 0.2.9 (July 20, 2021) ##
181
- * Fix fstab entry from `entry` to `entry[:entry]` in the `for_each`iteration.
207
+ * Fix fstab entry from `entry` to `entry[:entry]` in the `for_each`iteration.
182
208
 
183
209
  ## Kanrisuru 0.2.8 (July 20, 2021) ##
184
- * Update gem development and runtime depedencies with stricter depencies.
210
+ * Update gem development and runtime depedencies with stricter depencies.
185
211
 
186
212
  ## Kanrisuru 0.2.7 (July 18, 2021) ##
187
- * Set opensuse upstream to sles (Suse Enterprise Linux) in `os_family`
213
+ * Set opensuse upstream to sles (Suse Enterprise Linux) in `os_family`
188
214
 
189
215
  ## Kanrisuru 0.2.6 (July 17, 2021) ##
190
- * Force "-" to "\_" from `os-release` release name in `host.os` module.
216
+ * Force "-" to "\_" from `os-release` release name in `host.os` module.
191
217
 
192
218
  ## Kanrisuru 0.2.5 (July 16, 2021) ##
193
- * Update gem depedencies to non-zero values
194
- * Change summary and description fields for `apt`
195
- * Move `normalize_size` from `apt` core module, to
196
- `Kanrisuru::Util::Bits` class.
197
- * Add additional test cases for `apt` core module.
198
- * Add `-hi` to `who` command to explicility print out ip address for user.
199
- * Update `inode?` command to execute without shell user.
200
- * Add `yum` package manager core module
219
+ * Update gem depedencies to non-zero values.
220
+ * Change summary and description fields for `apt`.
221
+ * Move `normalize_size` from `apt` core module, to `Kanrisuru::Util::Bits` class.
222
+ * Add additional test cases for `apt` core module.
223
+ * Add `-hi` to `who` command to explicility print out ip address for user.
224
+ * Update `inode?` command to execute without shell user.
225
+ * Add `yum` package manager core module
201
226
 
202
227
  ## Kanrisuru 0.2.4 (July 10, 2021) ##
203
- * Fix error in `ip_rule` and `ip_address` sub modules with command typo.
228
+ * Fix error in `ip_rule` and `ip_address` sub modules with command typo.
204
229
 
205
230
  ## Kanrisuru 0.2.3 (July 07, 2021) ##
206
- * Add `apt` package manager core module
231
+ * Add `apt` package manager core module
207
232
 
208
233
  ## Kanrisuru 0.2.2 (June 16, 2021) ##
209
- * Fix `read_file_chunk` on checking bounds for start and end line values.
234
+ * Fix `read_file_chunk` on checking bounds for start and end line values.
210
235
 
211
236
  ## Kanrisuru 0.2.1 (June 16, 2021) ##
212
- * Add first working release on rubygems.org
237
+ * Add first working release on rubygems.org
213
238
 
214
239
  ## Kanrisuru 0.2.0 (June 16, 2021) [YANKED] ##
215
240
 
216
241
  ## Kanrisuru 0.1.0 (December 12, 2020) ##
217
- * Initialize repository, start working on project.
242
+ * Initialize repository, start working on project.
data/CODE_OF_CONDUCT.md CHANGED
@@ -14,21 +14,21 @@ orientation.
14
14
  Examples of behavior that contributes to creating a positive environment
15
15
  include:
16
16
 
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
22
 
23
23
  Examples of unacceptable behavior by participants include:
24
24
 
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
26
  advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
30
  address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
32
  professional setting
33
33
 
34
34
  ## Our Responsibilities
data/README.md CHANGED
@@ -1,12 +1,20 @@
1
- [![Latest version](https://img.shields.io/gem/v/kanrisuru?style=flat-square)](https://rubygems.org/gems/kanrisuru) 
2
- [![Latest version](https://img.shields.io/github/license/avamia/kanrisuru)](https://github.com/avamia/kanrisuru/blob/main/LICENSE.txt) 
3
- ![GitHub repo size](https://img.shields.io/github/repo-size/avamia/kanrisuru) 
4
- ![Codecov](https://img.shields.io/codecov/c/gh/avamia/kanrisuru?token=2Q1BE106B2) 
5
-
6
1
  <p align='center'>
7
2
  <img src="https://s3.us-east-2.amazonaws.com/kanrisuru.com/kanrisuru-banner-02.png" width="600" />
8
3
  </p>
9
4
 
5
+ <p align="center">
6
+ <a href="https://rubygems.org/gems/kanrisuru">
7
+ <img src="https://img.shields.io/gem/v/kanrisuru?style=flat-square" alt="Latest version" />
8
+ </a>
9
+ <a href="https://github.com/avamia/kanrisuru/blob/main/LICENSE.txt">
10
+ <img src="https://img.shields.io/github/license/avamia/kanrisuru" alt="Latest version" />
11
+ </a>
12
+ <img src="https://img.shields.io/github/repo-size/avamia/kanrisuru" alt="GitHub repo size" />
13
+ <img src="https://img.shields.io/codecov/c/gh/avamia/kanrisuru?token=2Q1BE106B2" alt="Codecov" />
14
+ <img src="https://img.shields.io/codacy/grade/9e839eb160bc445ea4e81b64cef22b27" alt="Codacy grade" />
15
+ <img src="https://img.shields.io/codeclimate/maintainability/avamia/kanrisuru" alt="Code Climate maintainability" />
16
+ </p>
17
+
10
18
  # Kanrisuru
11
19
 
12
20
  Kanrisuru (manage) helps you remotely control infrastructure using Ruby. This is done over SSH. I'm working on building up some basic functionality to help quickly provision, deploy and manage a single host or cluster of hosts.
@@ -27,14 +35,17 @@ gem 'kanrisuru'
27
35
 
28
36
  And then execute:
29
37
 
30
- $ bundle install
38
+ ```bash
39
+ $ bundle install
40
+ ```
31
41
 
32
42
  Or install it yourself as:
33
43
 
34
- $ gem install kanrisuru
44
+ ```bash
45
+ $ gem install kanrisuru
46
+ ```
35
47
 
36
48
  ## Usage
37
-
38
49
  Run basic commands you would have access to while running on a remote host or on a cluster of hosts.
39
50
 
40
51
  ### Host
@@ -78,88 +89,6 @@ cluster = Kanrisuru::Remote::Cluster.new(host, {host: 'host2', username: 'alice'
78
89
  cluster.execute('uname') #=> {host: 'host1', result: 'Linux'}, {host: 'host2', result: 'Linux'}
79
90
  ```
80
91
 
81
- ## Methods and Testing
82
-
83
- | Description | Ruby | Shell | Module | Man | Debian | Ubuntu | Fedora | Centos | RHEL | openSUSE | SLES |
84
- |---------------------------------------|------------------|--------------------|--------|--------------------------------------|--------|--------|--------|--------|------|----------|------|
85
- | **System** | | | | | | | | | | | |
86
- | Get CPU Info | cpu_info | lscpu | core | https://linux.die.net/man/1/lscpu | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
87
- | Get CPU architecture | lscpu | lscpu | core | https://linux.die.net/man/1/lscpu | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
88
- | Get kernel stastics | kernel_statistics | cat /proc/stat | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
89
- | Get hardware BIOS info | dmi | dmidecode | core | https://linux.die.net/man/8/dmidecode | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
90
- | Get open file details for processes | lsof | lsof | core | https://linux.die.net/man/8/lsof | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
91
- | Get Load Average | load_average | cat /proc/load_avg | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
92
- | Get RAM Available | free | cat /proc/meminfo | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
93
- | Get list of processes | ps | ps | core | https://linux.die.net/man/1/ps | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
94
- | Get Env vars | load_env | env | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
95
- | Kill process | kill | kill | core | https://linux.die.net/man/1/kill | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
96
- | Get uptime of system | uptime | cat /proc/uptime | core | https://linux.die.net/man/1/uptime | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
97
- | Get who's logged in | w | w | core | https://linux.die.net/man/1/w | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
98
- | Reboot machine | reboot | shutdown | core | https://linux.die.net/man/8/reboot | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
99
- | Poweroff machine | poweroff | shutdown | core | https://linux.die.net/man/8/shutdown | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
100
- | **Disk** | | | | | | | | | | | |
101
- | Get Disk Space | df | df | core | https://linux.die.net/man/1/df | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
102
- | Get Disk Usage | du | du | core | https://linux.die.net/man/1/du | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
103
- | List block devices | lsblk | lsblk | core | https://linux.die.net/man/8/lsblk | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
104
- | Get block device attributes | blkid | blikd | core | https://linux.die.net/man/8/blkid | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
105
- | **Mount** | | | | | | | | | | | |
106
- | Mount a filesystem | mount | mount | core | https://linux.die.net/man/8/mount | | | | | | | |
107
- | Unmount a filesystem | umount | umount | core | https://linux.die.net/man/8/umount | | | | | | | |
108
- | **Group** | | | | | | | | | | | |
109
- | Get Group Id | get_gid | getent group | core | https://linux.die.net/man/1/getent | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
110
- | Get Group | get_group | grep /etc/group | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
111
- | Create Group | create_group | groupadd | core | https://linux.die.net/man/8/groupadd | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
112
- | Update Group | update_group | groupmod | core | https://linux.die.net/man/8/groupmod | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
113
- | Delete Group | delete_group | groupdel | core | https://linux.die.net/man/8/groupdel | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
114
- | **User** | | | | | | | | | | | |
115
- | Get User Id | get_uid | id -u | core | https://linux.die.net/man/1/id | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
116
- | Get User | get_user | id | core | https://linux.die.net/man/1/id | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
117
- | Create User | create_user | useradd | core | https://linux.die.net/man/8/useradd | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
118
- | Update User | update_user | usermod | core | https://linux.die.net/man/8/usermod | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
119
- | Delete User | delete_user | userdel | core | https://linux.die.net/man/8/userdel | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
120
- | **Path** | | | | | | | | | | | |
121
- | List files and directories | ls | ls | core | https://linux.die.net/man/1/ls | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
122
- | Get Current Dir | pwd | pwd | core | https://linux.die.net/man/1/pwd | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
123
- | Get Current User | whoami | whoami | core | https://linux.die.net/man/1/whoami | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
124
- | Get Full Path of Shell Command | which | which | core | https://linux.die.net/man/1/which | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
125
- | Real Path | realpath | realpath | core | https://linux.die.net/man/1/realpath | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
126
- | Read link | readlink | readlink | core | https://linux.die.net/man/1/readlink | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
127
- | Change Dir | cd | cd | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
128
- | **File** | | | | | | | | | | | |
129
- | "Find file, dir, special file device" | find | find | core | https://linux.die.net/man/1/find | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
130
- | Stat file info | stat | stat | core | https://linux.die.net/man/1/stat | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
131
- | Change Permission of file / folder | chmod | chmod | core | https://linux.die.net/man/1/chmod | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
132
- | Change Ownership of file / folder | chown | chown | core | https://linux.die.net/man/1/chown | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
133
- | Hard Link File | ln | ln | core | https://linux.die.net/man/1/ln | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
134
- | Soft Link File / Dir | ln_s | ln | core | https://linux.die.net/man/1/ln | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
135
- | Create Directory | mkdir | mkdir | core | https://linux.die.net/man/1/mkdir | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
136
- | Remove file / directory | rm | rm | core | https://linux.die.net/man/1/rm | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
137
- | Remove Directory | rmdir | rm | core | https://linux.die.net/man/1/rm | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
138
- | Touch File | touch | touch | core | https://linux.die.net/man/1/touch | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
139
- | Copy file / directory | cp | cp | core | https://linux.die.net/man/1/cp | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
140
- | Move file / directory | mv | mv | core | https://linux.die.net/man/1/mv | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
141
- | "Get file line, word, and char count" | wc | wc | core | https://linux.die.net/man/1/wc | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
142
- | **Stream** | | | | | | | | | | | |
143
- | Get content from beginning of file | head | head | core | https://linux.die.net/man/1/head | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
144
- | Get content from end of file | tail | tail | core | https://linux.die.net/man/1/tail | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
145
- | Read a chunk from a file by lines | reach_file_chunk | tail and head | core | | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
146
- | Echo to stdout or to file | echo | echo | core | https://linux.die.net/man/1/echo | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
147
- | Get all content from a file | cat | cat | core | https://linux.die.net/man/1/cat | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
148
- | Sed | sed | sed | core | https://linux.die.net/man/1/sed | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
149
- | **Archive** | | | | | | | | | | | |
150
- | Tar Files | tar | tar | core | https://linux.die.net/man/1/tar | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
151
- | **Network** | | | | | | | | | | | |
152
- | Manage network devices | ip | ip | core | https://linux.die.net/man/8/ip | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
153
- | Get Socket Details | ss | ss | core | https://linux.die.net/man/8/ss | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
154
- | **Transfer** | | | | | | | | | | | |
155
- | Upload to remote server | upload | scp | core | https://linux.die.net/man/1/scp | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
156
- | Download from remote server | download | scp | core | https://linux.die.net/man/1/scp | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
157
- | Wget | wget | wget | core | https://linux.die.net/man/1/wget | [x] | [x] | [x] | [x] | [x] | [x] | [x] |
158
- | **Packages** | | | | | | | | | | | |
159
- | Apt | apt | apt | core | https://linux.die.net/man/1/apt | [x] | [x] | | | | | |
160
- | Yum | yum | yum | core | https://linux.die.net/man/1/yum | | | [x] | [x] | [x] | | |
161
- | Zypper | zypper | zypper | core | https://en.opensuse.org/SDB:Zypper_manual | | | | | | [x] | [x] |
162
-
163
92
  ## Development
164
93
 
165
94
  After checking out the repo, run `bin/setup` to install dependencies.
data/kanrisuru.gemspec CHANGED
@@ -9,11 +9,12 @@ Gem::Specification.new do |gem|
9
9
  gem.email = 'ryan@avamia.com'
10
10
  gem.license = 'MIT'
11
11
  gem.summary = 'Manage remote servers over ssh with ruby.'
12
- gem.description = 'Kanrisuru helps manage remote servers with objected oriented ruby. Results come back as structured data, parsed, prepared and ready .'
12
+ gem.description = 'Kanrisuru helps manage remote servers with objected oriented ruby. Results come back as structured data, parsed, prepared and ready.'
13
13
  gem.homepage = 'https://github.com/avamia/kanrisuru'
14
14
 
15
15
  gem.required_ruby_version = '>= 2.5.0'
16
16
 
17
+ gem.add_development_dependency 'parallel_tests', '~> 3.7'
17
18
  gem.add_development_dependency 'rspec', '~> 3.10'
18
19
  gem.add_development_dependency 'rubocop', '~> 1.12'
19
20
  gem.add_development_dependency 'rubocop-rspec', '~> 2.2'