leftify 0.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8ca7810be54139adc1423185f4d01de9a41502b
4
- data.tar.gz: 3243d9cbff0be9d6f0bc3318a6be9b0837be1fe8
3
+ metadata.gz: 263c88983363932811ad9d74a50b32c282070e77
4
+ data.tar.gz: 2480a13561330c54a5fe2b94aed74999c58f0f64
5
5
  SHA512:
6
- metadata.gz: f222ed95d57745a65b59b94fb635b95950ea2b6bf72ce23d30c2f3be24110d654e147ee12268c81734cf4d95c5a663912d3e52c73d7709b8059350edd51b6525
7
- data.tar.gz: 224297e2899b279a23dc86c6596a15f07aa6a14aa40316cf5e8181e62351d65bc7c0e4d0a331ad639721f34922b32da89f8fd5bfa785f5f1bfd24a91b8ad3281
6
+ metadata.gz: 6cf48e34c2e595b05e6fbc4d308ed071499396e6af99bb0d25a7317c1b9c441130fac79a685fc07e316a7241ad9cf473592e4143c23d2a961a4b8d8e4aa3dc30
7
+ data.tar.gz: 7da28f43626b15d7325cfeff52f0de3d05a3b5e55c0b6eeff97bd94b4004a50561fa133ecce2a1d625f527416f83b1ea00a4d6c18970404efba329e292698c8b
data/README.md CHANGED
@@ -1,12 +1,45 @@
1
1
  # Leftify
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/leftify`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Indent text to the left a set number of spaces. A scenario that fits this would be posting code to stackoverflow or reddit where indentation is needed.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Disclaimer
6
+
7
+ `Use at your own risk!` I am not responsible any damage to your file or fystem. If you are not sure this will work for you, install it on a vagrant vm and give it a try there. You can use the Vagrantfile that is in this repo to take care of configuring a useable vm.
8
+
9
+ ## Usage
10
+
11
+ Defaults to `4` space indent
12
+
13
+ ```
14
+ printf "Hello
15
+ World" | leftify
16
+ ```
17
+
18
+ produces:
19
+
20
+ ```
21
+ Hello
22
+ World
23
+ ```
24
+
25
+ Override the default number of spaces (say 40 spaces)
26
+
27
+ ```
28
+ printf "Hello
29
+ World" | SPACES=30 fcode
30
+ ```
31
+
32
+ produces:
33
+
34
+
35
+ ```
36
+ Hello
37
+ World
38
+ ```
6
39
 
7
40
  ## Installation
8
41
 
9
- Add this line to your application's Gemfile:
42
+ In your terminal:
10
43
 
11
44
  ```ruby
12
45
  gem 'leftify'
@@ -20,16 +53,31 @@ Or install it yourself as:
20
53
 
21
54
  $ gem install leftify
22
55
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
56
  ## Development
28
57
 
29
58
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
59
 
31
60
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
61
 
62
+ ## Releasing
63
+
64
+ To release a new version:
65
+
66
+ * update the version number in `version.rb`
67
+ * tag the the code `git tag v1.0.0`
68
+ * push the tag `git push --tags`
69
+ * then run `bundle exec rake build`
70
+ * `gem push pkg/myrails-version`
71
+
72
+ Which will push the `.gem` file to [rubygems.org](https://rubygems.org).
73
+
33
74
  ## Contributing
34
75
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/leftify.
76
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/vmcilwain/leftify).
77
+
78
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
79
+
80
+
81
+ ## License
82
+
83
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,9 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ ENV['DEFAULT_SPACES'] = '4'
4
+
5
+ count = ENV['SPACES'].nil? ? ENV['DEFAULT_SPACES'] : ENV['SPACES']
6
+
7
+ ARGF.each_line do |line|
8
+ puts "\s" * Integer(count) + line
9
+ end
@@ -1,4 +1,4 @@
1
- require "leftify/version"
1
+ require_relative "leftify/version"
2
2
 
3
3
  module Leftify
4
4
  # Your code goes here...
@@ -1,3 +1,3 @@
1
1
  module Leftify
2
- VERSION = "0.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leftify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vell