turtlelinks 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/bin/turtlelinks +33 -0
- data/lib/turtlelinks.rb +5 -0
- data/lib/turtlelinks/version.rb +3 -0
- data/turtlelinks.gemspec +23 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 548c543aa0ea29d4e9eca8c09abad41a90a96bff
|
4
|
+
data.tar.gz: 6400e64e406fc018fb42e61c13954f1285a0a88d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c3ef2e1413572c43dce5857e78bb8184f0e31bc49f78928f7ffa1a2284ba85bd9d9460ec6af172bd8af9affeb050d877df9b56fac3d9c5319221858508b97ede
|
7
|
+
data.tar.gz: 45280c0897c0516d90332d1782b439e93fa1ab2fa0ea3c63702cb1a829926aa2f868ed55dd5636f2f1137a19ef6b3762ed3d445432d1013d15ddd157f25cf1d1
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Eric Kelly
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Turtlelinks
|
2
|
+
|
3
|
+
Use this gem in order to easily remove [turbolinks](turbolinks) from your Rails
|
4
|
+
app.
|
5
|
+
|
6
|
+
This has currently only been tested with Rails 4.1.6. Support for previous
|
7
|
+
versions of Rails will be added in the future. Please file an issue if you find
|
8
|
+
another version of Rails that this does not work with.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
```no-highlight
|
13
|
+
gem install turtlelinks
|
14
|
+
```
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
Navigate to the root directory of a Rails app and run the following command:
|
19
|
+
|
20
|
+
```no-highlight
|
21
|
+
turtlelinks
|
22
|
+
```
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it ( https://github.com/HeroicEric/turtlelinks/fork )
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create a new Pull Request
|
31
|
+
|
32
|
+
[turbolinks]: https://github.com/rails/turbolinks
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/turtlelinks
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'turtlelinks'
|
4
|
+
|
5
|
+
current_path = Dir.pwd
|
6
|
+
puts "Current path: #{current_path}"
|
7
|
+
|
8
|
+
# Remove turbolinks from app/layouts/application.html.erb
|
9
|
+
layout_file = File.join(current_path, 'app/views/layouts/application.html.erb')
|
10
|
+
layout_with_turbolinks = File.read(layout_file)
|
11
|
+
layout_without_turbolinks = layout_with_turbolinks.gsub(/, 'data-turbolinks-track' => true/, '')
|
12
|
+
File.open(layout_file, 'w') { |file| file << layout_without_turbolinks }
|
13
|
+
|
14
|
+
# Remove turbolinks from the Gemfile
|
15
|
+
gemfile_file = File.join(current_path, 'Gemfile')
|
16
|
+
gemfile_with_turbolinks = File.read(gemfile_file)
|
17
|
+
|
18
|
+
gemfile_regexes = [
|
19
|
+
'# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks',
|
20
|
+
/gem 'turbolinks'\n/
|
21
|
+
]
|
22
|
+
|
23
|
+
gemfile_without_turbolinks = gemfile_regexes.inject(gemfile_with_turbolinks) do |content, regex|
|
24
|
+
content.gsub!(regex, '')
|
25
|
+
end
|
26
|
+
|
27
|
+
File.open(gemfile_file, 'w') { |file| file << gemfile_without_turbolinks }
|
28
|
+
|
29
|
+
# Remove from app/assets/javascripts/application.js
|
30
|
+
app_js_file = File.join(current_path, 'app/assets/javascripts/application.js')
|
31
|
+
app_js_with_turbolinks = File.read(app_js_file)
|
32
|
+
app_js_without_turbolinks = app_js_with_turbolinks.gsub(/\/\/= require turbolinks\n/, '')
|
33
|
+
File.open(app_js_file, 'w') { |file| file << app_js_without_turbolinks }
|
data/lib/turtlelinks.rb
ADDED
data/turtlelinks.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'turtlelinks/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "turtlelinks"
|
8
|
+
spec.version = Turtlelinks::VERSION
|
9
|
+
spec.authors = ["Eric Kelly"]
|
10
|
+
spec.email = ["heroiceric@gmail.com"]
|
11
|
+
spec.summary = %q{Easily remove turbolinks from your Rails app.}
|
12
|
+
spec.description = %q{Easily remove turbolinks from your Rails app.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: turtlelinks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Kelly
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-24 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: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Easily remove turbolinks from your Rails app.
|
42
|
+
email:
|
43
|
+
- heroiceric@gmail.com
|
44
|
+
executables:
|
45
|
+
- turtlelinks
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- bin/turtlelinks
|
55
|
+
- lib/turtlelinks.rb
|
56
|
+
- lib/turtlelinks/version.rb
|
57
|
+
- turtlelinks.gemspec
|
58
|
+
homepage: ''
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.2.2
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: Easily remove turbolinks from your Rails app.
|
82
|
+
test_files: []
|