sean-connery 0.1.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6a9ed1f2db144cffec4f62f445350277fae3441b
4
+ data.tar.gz: eb0d5e76029a382135d8996ba0f08b95c4cf42a2
5
+ SHA512:
6
+ metadata.gz: 92d0310b9bf9e9d6856d2e628283e4b26ea322a83d8d54b3c1704ec556919549a3fe3be642ecdaa05902b77690483fb874ed1d0e4e9bf1ba6a317a89401a7293
7
+ data.tar.gz: 904b48c99ecd5c0fd801bf5eb7cc15566f2d49dc1e0a4a9c0af5e31c82db4496d216d16436fe930eeced0140264ce69c57b16e86dd96ec27f795805bd9e8a9f1
@@ -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
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.0
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at david.a.shah@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in sean-connery.gemspec
4
+ gemspec
5
+
6
+ gem 'pry-byebug'
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Dave Shah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,62 @@
1
+ # Sean::Connery
2
+
3
+ ![](sean.jpg)
4
+
5
+ ## Inshtallation
6
+
7
+ Add thish line to your application'sh Gemfile:
8
+
9
+ ```ruby
10
+ gem 'sean-connery'
11
+ ```
12
+
13
+ And then exshecute:
14
+
15
+ $ bundle
16
+
17
+ Or inshtall it yourshelf ash:
18
+
19
+ $ gem install sean-connery
20
+
21
+ ## Ushage
22
+
23
+ Ushage ish quite shimple. Jusht include `Sean::Connery`:
24
+
25
+ ```ruby
26
+ class MyWidget
27
+ include Sean::Connery
28
+
29
+ def say_something
30
+ puts "Hello World"
31
+ end
32
+ end
33
+ ```
34
+ Onshe you've included Sean Connery, your objectsh should reshpond to meshagesh you pash to them in your very besht Sean Connery acshent:
35
+
36
+ ```ruby
37
+
38
+ > widget = MyWidget.new
39
+ > widget.say_something
40
+ => "Hello World"
41
+ > widget.shay_shomething # Notishe the acshent. Shuch fun!
42
+ => "Hello World"
43
+
44
+ ```
45
+
46
+ There are a few limitationsh right now. For ekshample, shelf ishn't shupported, but clash and inshtanshe methodsh should work jusht fine.
47
+
48
+ ## Development
49
+
50
+ After checking out the repo, run `bin/setup` to inshtall dependenciesh. Then, run `rake spec` to run the teshtsh. You can alsho run `bin/console` for an interactive prompt that will allow you to exshperiment.
51
+
52
+ To inshtall thish gem onto your local machine, run `bundle exec rake install`. To releashe a new vershion, update the vershion number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the vershion, push git commitsh and tagsh, and push the `.gem` file to [rubygemsh.org](https://rubygems.org).
53
+
54
+ ## Contributing
55
+
56
+ Bug reportsh and pull requeshtsh are welcome on GitHub at https://github.com/daveshah/sean-connery. Thish project is intended to be a shafe, welcoming shpace for collaboration, and contributorsh are exshpected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
57
+
58
+
59
+ ## Licenshe
60
+
61
+ The gem is available as open shource under the termsh of the [MIT Licenshe](http://opensource.org/licenses/MIT).
62
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "sean/connery"
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
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,51 @@
1
+ require "sean/connery/version"
2
+
3
+ require 'pry'
4
+ module Sean
5
+ module Connery
6
+ S_REGEX = /([^_]?)([s][sh]*|z)([\s$]?)/
7
+ C_REGEX = /([^_]?)c([eiy])/
8
+ ESS_REGEX = /_s([\s_]|$)/
9
+
10
+ def ping
11
+ result = super
12
+ undef ping
13
+ puts 'One. ping. only.'
14
+ result
15
+ end
16
+
17
+ def self.included(base)
18
+ base.extend(ClassMethods)
19
+ end
20
+
21
+ module ClassMethods
22
+ def new(*args, &block)
23
+ obj = super
24
+ Sean::Connery.seanify_the obj
25
+ obj
26
+ end
27
+ end
28
+
29
+ def self.say(something)
30
+ something
31
+ .gsub(S_REGEX, '\1sh\3')
32
+ .gsub(C_REGEX, '\1sh\2')
33
+ .gsub('x', 'ksh')
34
+ .gsub(ESS_REGEX, '_esh\1')
35
+ end
36
+
37
+ def self.seanify_the(obj)
38
+ obj.methods.find_all { |m| m.to_s.include?('s') }.each do |method|
39
+ Sean::Connery.aliash_the obj, method
40
+ end
41
+ obj.class.methods.find_all { |m| m.to_s.include?('s') }.each do |method|
42
+ Sean::Connery.aliash_the obj.class, method
43
+ end
44
+ end
45
+
46
+ def self.aliash_the(base, method)
47
+ owner = base.method(method).owner
48
+ owner.send :alias_method, self.say(method.to_s).to_sym, method
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,5 @@
1
+ module Sean
2
+ module Connery
3
+ VERSION = '0.1.1'
4
+ end
5
+ end
@@ -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 'sean/connery/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "sean-connery"
8
+ spec.version = Sean::Connery::VERSION
9
+ spec.authors = ["Dave Shah", "Jonah Roth", "Graham Conzett"]
10
+ spec.email = ["david.a.shah@gmail.com"]
11
+
12
+ spec.summary = %q{This gem makes everything shpeshial}
13
+ spec.description = %q{Yep, shpeshial}
14
+ spec.homepage = "https://github.com/daveshah/sean-connery"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.12"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3.0"
25
+ spec.add_development_dependency "pry"
26
+ end
Binary file
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sean-connery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Dave Shah
8
+ - Jonah Roth
9
+ - Graham Conzett
10
+ autorequire:
11
+ bindir: exe
12
+ cert_chain: []
13
+ date: 2018-09-27 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.12'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.12'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rake
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '10.0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '10.0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: rspec
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '3.0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '3.0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: pry
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ description: Yep, shpeshial
72
+ email:
73
+ - david.a.shah@gmail.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - ".gitignore"
79
+ - ".rspec"
80
+ - ".travis.yml"
81
+ - CODE_OF_CONDUCT.md
82
+ - Gemfile
83
+ - LICENSE.txt
84
+ - README.md
85
+ - Rakefile
86
+ - bin/console
87
+ - bin/setup
88
+ - lib/sean/connery.rb
89
+ - lib/sean/connery/version.rb
90
+ - sean-connery.gemspec
91
+ - sean.jpg
92
+ homepage: https://github.com/daveshah/sean-connery
93
+ licenses:
94
+ - MIT
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubyforge_project:
112
+ rubygems_version: 2.6.14
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: This gem makes everything shpeshial
116
+ test_files: []