insup 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50dd77c58e2d1a3ce04bd92d4d7bc9c2d22f4af3
4
- data.tar.gz: 1dcacbe9f405205fa16c3f8a827b96f934fb96d7
3
+ metadata.gz: 2a1a2bf26b0e5df37d99938add4d7410a5856179
4
+ data.tar.gz: c5c3f26607ffc2ec88ff2547921214e018e836ce
5
5
  SHA512:
6
- metadata.gz: 4ab17cb95225f9787d1fde6b20b20e5e4edecb93235ba584ed706b99ee15f786362747abb57b88109ca70b36baa320d89b13655828fbea2af85a188f9fbebf69
7
- data.tar.gz: 95dbbdbd6fe84c8f10ff9799e61610dd5eb9b002266827e1e971d2ebc2178f4668aaeccfa334a907627bd7e3fad11fcf52ed1784a4f1bf0d519ba2e7b98b18f5
6
+ metadata.gz: 2562fd32e1fa45d9d202a3f5557c6136685e82fd5a84a96d0c2d2dad15916906998853d75c4226804b1452f86ce50045c6fc5a3cc476630700b9a9cfa804e392
7
+ data.tar.gz: 83dab170e9caef7061498887b9d6c3a64ac21267eb7f8e6b2778a4451f2a423d13cc92183e5579756192fd6455077de7e84849b22868e75eb20749deab0ff29b
data/README.md CHANGED
@@ -33,6 +33,7 @@ Open **.insup** file with your favourite text editor and modify the configuratio
33
33
  * [**uploader**](#uploaders) section specifies the uploader to use as well as its configuration. The uploader class is specified by the `class` option.
34
34
  * **insales** secion holds information for connecting to Insales shop. To use insales features you should specify `subdomain`, `api_key` and `password` parameters.
35
35
  * **log** section sets logging parameters. Use `file` to specify a log file path, `level` to set log level (`unknown`, `debug`, `error`, `fatal`, `info`, `unknown` and `warn`), and `pattern` to specify log message pattern using `%{timestamp}`, `%{level}`, `%{message}`, and `%{backtrace}` substitutions.
36
+ * **options** section specifies miscellaneous options. Currently only [force_polling](#mac-osx-users) option is implemented.
36
37
 
37
38
  #### Trackers
38
39
 
@@ -111,3 +112,27 @@ To see help message on the specific command, type:
111
112
  ```bash
112
113
  insup <command> --help
113
114
  ```
115
+
116
+ ##Troubleshooting
117
+
118
+ ### Mac OsX users
119
+ For a reason yet unknown sometimes on a newer versions of Mac OsX Insup will only listen to changes that take place under the last folder listed in `track` settings.
120
+
121
+ Current workaround is to fall back to filesystem polling by adding the following lines to the configuration:
122
+
123
+ ```yaml
124
+ options:
125
+ force_polling: true
126
+ ```
127
+
128
+ Filesystem polling may increase the CPU usage and decrease performance. Use this only if Insup doesn't work otherwise.
129
+
130
+ ### Windows users
131
+ There was an issue report from Windows users concerning wrong file encoding upon uploading UTF-8 files to Insales. If you are experiencing encoding problems when running Insup on Windows, please use the following workaround until the problem is investigated and solved.
132
+
133
+ Before running any `insup` command exectute the following:
134
+ ```bash
135
+ chcp 65001
136
+ ```
137
+
138
+ This will change the econding of your Windows console to UTF-8 and allow you to avoid most encoding problems.
data/insup.template CHANGED
@@ -3,6 +3,7 @@ track:
3
3
  - media
4
4
  - snippets
5
5
  - templates
6
+ - configuration
6
7
 
7
8
  # Tracker settings
8
9
  # class: tracker class. Use 'git' or 'simple'
@@ -12,7 +13,7 @@ tracker:
12
13
  # Insales settings
13
14
  # subdomain: your Insales subdomain, e.g. my-shop.myinsales.ru
14
15
  # api_key: Insales API key for insup application
15
- # password: Insales API passeword for insup application
16
+ # password: Insales API password for insup application
16
17
  insales:
17
18
  subdomain:
18
19
  api_key:
@@ -48,3 +49,10 @@ log:
48
49
  file: 'log/insup.log'
49
50
  level: 'info'
50
51
  pattern: "%{timestamp} - %{level}\t: %{message} %{backtrace}\n"
52
+
53
+ # Other options
54
+ options:
55
+ # Force the use of polling when listening to changes
56
+ # Use only if Insup doesn't work otherwise
57
+ force_polling: false
58
+
@@ -10,7 +10,7 @@ class Listener
10
10
  def listen(&block)
11
11
  return if @listener
12
12
 
13
- @listener = Listen.to(tracked_locations) do |modified, added, removed|
13
+ @listener = Listen.to(tracked_locations, force_polling: @settings.options['force_polling']) do |modified, added, removed|
14
14
  flags = {}
15
15
 
16
16
  added.each do |file|
@@ -47,6 +47,10 @@ class Insup::Settings
47
47
  Kernel.const_get(level)
48
48
  end
49
49
 
50
+ def options
51
+ @settings['options'] || {}
52
+ end
53
+
50
54
  def log_pattern
51
55
  log['pattern'] || "%{message}\n"
52
56
  end
data/lib/insup/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Insup
2
- VERSION = '0.3'
2
+ VERSION = '0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: insup
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - HttpLab
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-14 00:00:00.000000000 Z
12
+ date: 2014-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.2.2
149
+ rubygems_version: 2.4.2
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: InSales theme uploader.