replace_class 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +70 -2
- data/lib/replace_class/option_parser.rb +1 -1
- data/lib/replace_class/replace_class.rb +1 -4
- data/lib/replace_class/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a690492fc18027c260bfd4043bef354884cddec0
|
4
|
+
data.tar.gz: ac95260f36356e69ab8f5564359dfd54f8ddbab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600d975cddc2e4f6a60c61a67e20d9f851e28b7823ef6a1d3dfc3ccc7bff7177915bf5fa14b03b62ff7a733ac97efb4e87b8b7f7ce2544155ec7e00c57a8d5ae
|
7
|
+
data.tar.gz: 11cbea83841ef23b58cd3f96c2c25310089301e26a1e6ca6550ebbfc816af11cd8cccdf980b800563c6c73546bcb3b73140c6287e480442f5e47b032fd444a3d
|
data/README.md
CHANGED
@@ -1,2 +1,70 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
ReplaceClassName
|
2
|
+
---
|
3
|
+
`ReplaceClassName` is An Easy Way for Replacing Classname
|
4
|
+
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/replace_class.svg)](http://badge.fury.io/rb/replace_class)
|
6
|
+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/MickeyHub/ReplaceClassName)
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## Install
|
11
|
+
|
12
|
+
```sh
|
13
|
+
$ gem install replace_class
|
14
|
+
```
|
15
|
+
|
16
|
+
**Note: If Mac OS X 10.11 or later, for `rootless`, you can not install replace_class directly, following is solution:**
|
17
|
+
|
18
|
+
1\. use [Homebrew](http://brew.sh/) and [RVM](https://rvm.io/) to install Ruby, then install replace_class(recommand)
|
19
|
+
|
20
|
+
```sh
|
21
|
+
# Install Homebrew:
|
22
|
+
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
23
|
+
|
24
|
+
# Install RVM:
|
25
|
+
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
|
26
|
+
|
27
|
+
$ gem install replace_class
|
28
|
+
```
|
29
|
+
|
30
|
+
2\. specify replace_class's bin file PATH
|
31
|
+
|
32
|
+
```sh
|
33
|
+
$ export PATH=/usr/local/bin:$PATH;gem install -n /usr/local/bin replace_class
|
34
|
+
```
|
35
|
+
|
36
|
+
3\. override Ruby Gem 's bindir
|
37
|
+
|
38
|
+
```sh
|
39
|
+
$ echo 'gem: --bindir /usr/local/bin' >> ~/.gemrc
|
40
|
+
$ gem install replace_class
|
41
|
+
```
|
42
|
+
|
43
|
+
## Usage
|
44
|
+
|
45
|
+
```text
|
46
|
+
Usage: [replace_class -s source -d dest path]
|
47
|
+
-s, --source sourceClass Source class name for replacement
|
48
|
+
-d, --dest destClass Dest class name for replacement
|
49
|
+
-f, --force No interaction with user
|
50
|
+
-y, --yes Same to force option
|
51
|
+
```
|
52
|
+
|
53
|
+
## Example
|
54
|
+
```sh
|
55
|
+
replace_class -s APOPost -d APOTuso $(SRCROOT)
|
56
|
+
```
|
57
|
+
|
58
|
+
**Note: if current working directory is $(SRCROOT), following is also available**
|
59
|
+
|
60
|
+
```sh
|
61
|
+
replace_class -s APOPost -d APOTuso
|
62
|
+
```
|
63
|
+
|
64
|
+
## Issues & Contributions
|
65
|
+
Please [open an issue here on GitHub](https://github.com/MickeyHub/ReplaceClassName/issues) if you have a problem, suggestion, or other comment.
|
66
|
+
|
67
|
+
Pull requests are welcome and encouraged! There are no official guidelines, but please try to be consistent with the existing code style.
|
68
|
+
|
69
|
+
## Licence
|
70
|
+
This project is licensed under the terms of the MIT license. See the LICENSE file.
|
@@ -15,7 +15,7 @@ module ReplaceClass
|
|
15
15
|
options = {}
|
16
16
|
parser = OptionParser.new do |opt|
|
17
17
|
|
18
|
-
opt.banner = "Usage: [
|
18
|
+
opt.banner = "Usage: replace_class [-s|--source] source [-d|--dest] [-fy] dest path"
|
19
19
|
|
20
20
|
opt.on('-s', '--source sourceClass', 'Source class name for replacement') do |value|
|
21
21
|
options[:source] = value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: replace_class
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MickeyHub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: easy way to replace class name in xcode using ruby
|
14
14
|
email:
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.4.
|
56
|
+
rubygems_version: 2.4.5.1
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: An Neat Script to Replace Class Name Globally for Xcode
|