vote_init 0.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 ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzUyMDc2ZmE2YTg2MjQ4NzVmZTcwNTM5NWQyNzg1MjEwNTllNDRlOQ==
5
+ data.tar.gz: !binary |-
6
+ NjdiNTZkNmQwOTAwMzQyNWVlY2MxYzBhN2QxNWYwNjIyNzlmMDRjMA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YjEyYmRkMGNhZTg0ZmM1YThlMGY4YzgxZTZkNjRkODMyZjc3Y2JiNTc4NmU0
10
+ MWZkNWIzMWZmMzBhYWNiNTRhYmRlYmZhNTc5YzUwMDg1OTNjOGI4YzIwMDJj
11
+ MGE5ZmE4ODk4YjYyOGRlYWUwZjE2ODI0ZjUyMDJiNDA1NmIwNTA=
12
+ data.tar.gz: !binary |-
13
+ M2FjNjg5NGU4Y2RlZGEzOGZiNWViYjg1MTI1NmY2YjY4YzhkZmZjMzNmMGNh
14
+ OGE0ZDUyYzY4MmY2NWQxNGYzMGI5NDlhZTczMWRlN2UzOTAzYjVmMzg4ODBi
15
+ Njg4ZDNmNjFiODNiZWEyNTA3NGIxMjlhMTRkODZmYmVkMzg4OTg=
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1.0
5
+ - 2.2.0
6
+ - ruby-head
7
+ - jruby-19mode
8
+ - jruby-head
9
+ - rbx-2
10
+ deploy:
11
+ provider: rubygems
12
+ api_key:
13
+ secure: Gc71yLrBVv67qYSC3r7+MP9rG6OiMy2k+XW7hAoorZkm0yfzzLsJDjE8tL8PlGC9UvSnQYqaDQhLdZ2oMixomKO8oA5PM2NB7fN891hLXSjVtaf6OsDjZMGl/SNdkMXbV6gmZ/G5/3aSlbIQNDEeIbu80JF+JyvalCElOf0rv/4=
14
+ gem: vote_init
15
+ on:
16
+ tags: true
17
+ repo: doodzik/vote_init
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in vote_init.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,69 @@
1
+ # VoteInit
2
+
3
+ Too many precious keystrokes are wasted on writing the Ruby class initializer!
4
+ This is unacceptable.
5
+ ![unessesary keystrokes are unacceptable](http://media.giphy.com/media/QUaqJRizED5NC/giphy.gif)
6
+
7
+ We should use a shorter word than 'initialize'. The word 'init' is shorter and equivalent to 'initialize'.
8
+
9
+ So this Gem gives you the ability to use init instead of initialize.
10
+
11
+ If you are in favor of 'init', but are concerned of the monkey patching of the Object class you can use this Abbreviation in your .vimrc file:
12
+
13
+
14
+ ```vim
15
+ ab init initialize
16
+ ```
17
+
18
+ ## Installation
19
+
20
+ Add this line to your application's Gemfile:
21
+
22
+ ```ruby
23
+ gem 'vote_init'
24
+ ```
25
+
26
+ And then execute:
27
+
28
+ $ bundle
29
+
30
+ Or install it yourself as:
31
+
32
+ $ gem install vote_init
33
+
34
+ ## Usage
35
+
36
+ ```ruby
37
+ require 'vote_init'
38
+
39
+ class Foo
40
+ def init
41
+ p 'foo'
42
+ end
43
+ end
44
+
45
+ class Bar
46
+ def initialize
47
+ p 'bar'
48
+ end
49
+ end
50
+
51
+ Bar.new
52
+ #=> "bar"
53
+ Foo.new
54
+ #=> "foo"
55
+ ```
56
+
57
+ ## Development
58
+
59
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
60
+
61
+ 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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
62
+
63
+ ## Contributing
64
+
65
+ 1. Fork it ( https://github.com/doodzik/vote_init/fork )
66
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
67
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
68
+ 4. Push to the branch (`git push origin my-new-feature`)
69
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'rake'
2
+ require 'bundler/gem_tasks'
3
+ require 'rspec/core/rake_task'
4
+ require 'rubocop/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ RuboCop::RakeTask.new(:rubocop)
8
+
9
+ task default: [:spec, :rubocop]
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'vote_init'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require 'pry'
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,4 @@
1
+ # specifies version of this gem
2
+ module VoteInit
3
+ VERSION = '0.1.0'
4
+ end
data/lib/vote_init.rb ADDED
@@ -0,0 +1,8 @@
1
+ require 'vote_init/version'
2
+
3
+ # mokey patches Object class to check if init is defined
4
+ class Object
5
+ def self.method_added(method_name)
6
+ alias_method :initialize, :init if method_name == :init
7
+ end
8
+ end
data/vote_init.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vote_init/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'vote_init'
8
+ spec.version = VoteInit::VERSION
9
+ spec.authors = ['doodzik']
10
+ spec.email = ['frederik.dudzik@gmail.com']
11
+
12
+ spec.summary = 'Use init instead of initialize'
13
+ spec.homepage = 'https://github.com/doodzik/vote_init'
14
+ spec.license = 'MIT'
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(/^(test|spec|features)\//)
17
+ end
18
+ spec.bindir = 'exe'
19
+ spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.6'
23
+ spec.add_development_dependency 'rake', '~> 10.0'
24
+ spec.add_development_dependency 'rspec'
25
+ spec.add_development_dependency 'rubocop'
26
+ end
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vote_init
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - doodzik
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-03-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description:
70
+ email:
71
+ - frederik.dudzik@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .rspec
78
+ - .travis.yml
79
+ - CODE_OF_CONDUCT.md
80
+ - Gemfile
81
+ - README.md
82
+ - Rakefile
83
+ - bin/console
84
+ - bin/setup
85
+ - lib/vote_init.rb
86
+ - lib/vote_init/version.rb
87
+ - vote_init.gemspec
88
+ homepage: https://github.com/doodzik/vote_init
89
+ licenses:
90
+ - MIT
91
+ metadata: {}
92
+ post_install_message:
93
+ rdoc_options: []
94
+ require_paths:
95
+ - lib
96
+ required_ruby_version: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ! '>='
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ requirements: []
107
+ rubyforge_project:
108
+ rubygems_version: 2.4.5
109
+ signing_key:
110
+ specification_version: 4
111
+ summary: Use init instead of initialize
112
+ test_files: []